VCCodeStruct::EndPointOf Property (vsCMPart, vsCMWhere)
Visual Studio 2015
Gets the end point of the object.
Assembly: Microsoft.VisualStudio.VCCodeModel (in Microsoft.VisualStudio.VCCodeModel.dll)
property TextPoint^ default[ vsCMPart Part, vsCMWhere Where = vsCMWhere::vsCMWhereDefault ] { TextPoint^ get(vsCMPart Part, vsCMWhere Where = vsCMWhere::vsCMWhereDefault); }
Parameters
- Part
-
Type:
EnvDTE::vsCMPart
Required. A vsCMPart value specifying which part of the definition or the declaration to use (attributes block, body, and so on).
- Where
-
Type:
Microsoft.VisualStudio.VCCodeModel::vsCMWhere
Optional. A vsCMWhere value specifying whether the TextPoint object is the definition or the declaration.
EndPointOf retrieves text points with more precision than the StartPoint property.
This example adds a comment at the end of a code element declaration.
[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
Show: