Export (0) Print
Expand All

TextPoint.CreateEditPoint Method

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

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

EditPoint CreateEditPoint()

Return Value

Type: EnvDTE.EditPoint
An EditPoint object.

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.

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!");
}

Show:
© 2014 Microsoft