EditPoint2.CreateEditPoint 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在调用对象的位置创建并返回一个 EditPoint 对象。
public:
EnvDTE::EditPoint ^ CreateEditPoint();
public:
EnvDTE::EditPoint ^ CreateEditPoint();
EnvDTE::EditPoint CreateEditPoint();
[System.Runtime.InteropServices.DispId(34)]
public EnvDTE.EditPoint CreateEditPoint ();
[<System.Runtime.InteropServices.DispId(34)>]
abstract member CreateEditPoint : unit -> EnvDTE.EditPoint
Public Function CreateEditPoint () As EditPoint
返回
EditPoint 对象。
实现
- 属性
示例
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!");
}
注解
CreateEditPoint 创建并返回一个新的 EditPoint 对象,该对象与调用对象位于同一物理位置。 如果调用对象为 VirtualPoint ,则生成的 EditPoint LineCharOffset 值与相同 VirtualPoint 。