Compartir a través de


EditPoint2.CreateEditPoint Method

Creates and returns an EditPoint object at the location of the calling object.

Namespace:  EnvDTE80
Assembly:  EnvDTE80 (in EnvDTE80.dll)

Syntax

'Declaration
Function CreateEditPoint As EditPoint
EditPoint CreateEditPoint()
EditPoint^ CreateEditPoint()
abstract CreateEditPoint : unit -> EditPoint
function CreateEditPoint() : EditPoint

Return Value

Type: EnvDTE.EditPoint
A EditPoint object.

Remarks

CreateEditPoint creates and returns a new EditPoint object at the same physical location as the calling object. If the calling object is a VirtualPoint, then the resulting EditPoint has the same LineCharOffset value as the VirtualPoint.

Examples

Sub CreateEditPointExample(ByVal dte As DTE2)

    ' Before running this example, open a text document.

    ' Append "Hello!" to the active document.
    Dim textDoc As TextDocument = _
        CType(dte.ActiveDocument.Object("TextDocument"), TextDocument)
    textDoc.EndPoint.CreateEditPoint().Insert("Hello!")

End Sub
public void CreateEditPointExample(DTE2 dte)
{
    // Before running this example, open a text document.

    // Append "Hello!" to the active document.
    TextDocument textDoc = 
        (TextDocument)dte.ActiveDocument.Object("TextDocument");
    textDoc.EndPoint.CreateEditPoint().Insert("Hello!");
}

.NET Framework Security

See Also

Reference

EditPoint2 Interface

EnvDTE80 Namespace

Other Resources

How to: Compile and Run the Automation Object Model Code Examples