Compartir a través de


TextDocument.CreateEditPoint(TextPoint) Method

Definition

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

EnvDTE::EditPoint CreateEditPoint(EnvDTE::TextPoint const & TextPoint = null);
[System.Runtime.InteropServices.DispId(131)]
public EnvDTE.EditPoint CreateEditPoint (EnvDTE.TextPoint TextPoint = default);
[<System.Runtime.InteropServices.DispId(131)>]
abstract member CreateEditPoint : EnvDTE.TextPoint -> EnvDTE.EditPoint
Public Function CreateEditPoint (Optional TextPoint As TextPoint = Nothing) As EditPoint

Parameters

TextPoint
TextPoint

Optional. A TextPoint object to copy. If a value is supplied to TextPoint, then the new point is at the same Line and LineCharOffset as TextPoint.

Returns

A EditPoint object.

Attributes

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

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.

Applies to