VCCodeDelegate.EndPointOf[vsCMPart, vsCMWhere] 属性

定义

返回父对象的终点。

public:
 property EnvDTE::TextPoint ^ EndPointOf[EnvDTE::vsCMPart, Microsoft::VisualStudio::VCCodeModel::vsCMWhere] { EnvDTE::TextPoint ^ get(EnvDTE::vsCMPart Part, Microsoft::VisualStudio::VCCodeModel::vsCMWhere Where); };
[System.Runtime.InteropServices.DispId(551)]
public EnvDTE.TextPoint EndPointOf[EnvDTE.vsCMPart Part, Microsoft.VisualStudio.VCCodeModel.vsCMWhere Where = Microsoft.VisualStudio.VCCodeModel.vsCMWhere.vsCMWhereDefault] { [System.Runtime.InteropServices.DispId(551)] [System.Runtime.InteropServices.TypeLibFunc(System.Runtime.InteropServices.TypeLibFuncFlags.FNonBrowsable)] get; }
[<System.Runtime.InteropServices.DispId(551)>]
[<get: System.Runtime.InteropServices.DispId(551)>]
[<get: System.Runtime.InteropServices.TypeLibFunc(System.Runtime.InteropServices.TypeLibFuncFlags.FNonBrowsable)>]
member this.EndPointOf(EnvDTE.vsCMPart * Microsoft.VisualStudio.VCCodeModel.vsCMWhere) : EnvDTE.TextPoint
Public ReadOnly Property EndPointOf(Part As vsCMPart, Optional Where As vsCMWhere = Microsoft.VisualStudio.VCCodeModel.vsCMWhere.vsCMWhereDefault) As TextPoint

参数

Part
vsCMPart

必需。 一个 vsCMPart 值,指定使用定义或声明的哪一部分(特性块、正文等等)。

Where
vsCMWhere

可选。 一个 vsCMWhere 值,指定 TextPoint 对象是定义还是声明。

属性值

TextPoint

TextPoint 对象。

属性

示例

此示例在代码元素声明的末尾添加注释。

[Visual Basic]

Sub AddCommentAtEnd()  
    Dim vcElement As VCCodeElement  
    Dim vcElements As VCCodeElements  
    Dim textPoint As TextPoint  
    vcElements = DTE.Solution.Item(1).CodeModel.Classes  
    vcElement = vcElements.Item(1)  
    textPoint = vcElement.EndPointOf(vsCMPart.vsCMPartWhole)  
    textPoint.CreateEditPoint().Insert("/*Comment*/")  
End Sub  

注解

EndPointOf[] 检索比属性更精确的文本点 StartPoint

有关如何编译和运行此示例的信息,请参阅 如何:编译 Visual C++ 代码模型扩展性的示例代码

适用于