VCCodeElement.StartPointOf[vsCMPart, vsCMWhere] 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取父对象的起点。
public:
property EnvDTE::TextPoint ^ StartPointOf[EnvDTE::vsCMPart, Microsoft::VisualStudio::VCCodeModel::vsCMWhere] { EnvDTE::TextPoint ^ get(EnvDTE::vsCMPart Part, Microsoft::VisualStudio::VCCodeModel::vsCMWhere Where); };
[System.Runtime.InteropServices.DispId(550)]
public EnvDTE.TextPoint StartPointOf[EnvDTE.vsCMPart Part, Microsoft.VisualStudio.VCCodeModel.vsCMWhere Where = Microsoft.VisualStudio.VCCodeModel.vsCMWhere.vsCMWhereDefault] { [System.Runtime.InteropServices.DispId(550)] [System.Runtime.InteropServices.TypeLibFunc(System.Runtime.InteropServices.TypeLibFuncFlags.FNonBrowsable)] get; }
[<System.Runtime.InteropServices.DispId(550)>]
[<get: System.Runtime.InteropServices.DispId(550)>]
[<get: System.Runtime.InteropServices.TypeLibFunc(System.Runtime.InteropServices.TypeLibFuncFlags.FNonBrowsable)>]
member this.StartPointOf(EnvDTE.vsCMPart * Microsoft.VisualStudio.VCCodeModel.vsCMWhere) : EnvDTE.TextPoint
Public ReadOnly Property StartPointOf(Part As vsCMPart, Optional Where As vsCMWhere = Microsoft.VisualStudio.VCCodeModel.vsCMWhere.vsCMWhereDefault) As TextPoint
参数
属性值
TextPoint 对象。
- 属性
示例
此示例在代码元素声明的开头添加注释。
Sub AddCommentAtBeginning()
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.StartPointOf(vsCMPart.vsCMPartWhole)
textPoint.CreateEditPoint().Insert("/*Comment*/")
End Sub
注解
有关如何编译和运行此示例的信息,请参阅 如何:编译 Visual C++ 代码模型扩展性的示例代码 。