Export (0) Print
Expand All

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)

EditPoint CreateEditPoint(
	TextPoint TextPoint
)

Parameters

TextPoint
Type: EnvDTE.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.

Return Value

Type: EnvDTE.EditPoint
A EditPoint object.

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.

public void CreateEditPointExample(_DTE dte)
{
    TextDocument td;
    EditPoint ep;

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

Show:
© 2015 Microsoft