Поделиться через


TextDocument.CreateEditPoint Method

Creates an EditPoint object at the specified location and returns it. The default location is the beginning of the document.

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

Syntax

'Declaration
Function CreateEditPoint ( _
    TextPoint As TextPoint _
) As EditPoint
EditPoint CreateEditPoint(
    TextPoint TextPoint
)
EditPoint^ CreateEditPoint(
    [InAttribute] TextPoint^ TextPoint
)
abstract CreateEditPoint : 
        TextPoint:TextPoint -> EditPoint 
function CreateEditPoint(
    TextPoint : TextPoint
) : EditPoint

Parameters

Return Value

Type: EnvDTE.EditPoint
A EditPoint object.

Remarks

CreateEditPoint creates and returns a new EditPoint object at the same physical location as the text point. If the object is a virtual point, then the resulting edit point has the same LineCharOffset value as the object.

Examples

Sub CreateEditPointExample(ByVal dte As EnvDTE.DTE)
    Dim objTD As TextDocument
    Dim objEP As EditPoint

    objTD = dte.ActiveDocument.Object("TextDocument")
    objEP = objTD.StartPoint.CreateEditPoint
    objEP.Insert("Hello")
End Sub
public void CreateEditPointExample(_DTE dte)
{
    TextDocument td;
    EditPoint ep;

    td = (TextDocument)dte.ActiveDocument.Object ("TextDocument");
    ep = td.StartPoint.CreateEditPoint();
    ep.Insert ("Hello");
}

.NET Framework Security

See Also

Reference

TextDocument Interface

EnvDTE Namespace