TextPoint.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
EditPoint CreateEditPoint()
EditPoint^ CreateEditPoint()
abstract CreateEditPoint : unit -> EditPoint
function CreateEditPoint() : EditPoint
Return Value
Type: EnvDTE.EditPoint
An EditPoint object.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Other Resources
How to: Compile and Run the Automation Object Model Code Examples