Share via


EditPoint.CreateEditPoint Method

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

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

Syntax

'Declaration
Function CreateEditPoint As EditPoint
'Usage
Dim instance As EditPoint 
Dim returnValue As EditPoint 

returnValue = instance.CreateEditPoint()
EditPoint CreateEditPoint()
EditPoint^ CreateEditPoint()
function CreateEditPoint() : EditPoint

Return Value

Type: EnvDTE.EditPoint
A EditPoint object.

Implements

TextPoint.CreateEditPoint()

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

EditPoint Interface

EditPoint Members

CreateEditPoint Overload

EnvDTE Namespace

Other Resources

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