VCCodeMacro.EndPointOf Property
Gets the end point of the object.
Namespace: Microsoft.VisualStudio.VCCodeModel
Assembly: Microsoft.VisualStudio.VCCodeModel (in Microsoft.VisualStudio.VCCodeModel.dll)
声明
ReadOnly Property EndPointOf ( _
Part As vsCMPart, _
Where As vsCMWhere _
) As TextPoint
用法
Dim instance As VCCodeMacro
Dim Part As vsCMPart
Dim Where As vsCMWhere
Dim value As TextPoint
value = instance.EndPointOf(Part, Where)
TextPoint EndPointOf[
vsCMPart Part,
vsCMWhere Where
] { get; }
property TextPoint^ EndPointOf[[InAttribute] vsCMPart Part, [InAttribute] vsCMWhere Where] {
TextPoint^ get ([InAttribute] vsCMPart Part, [InAttribute] vsCMWhere Where);
}
JScript does not support indexed properties.
Part
Type: vsCMPartRequired. 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.vsCMWhereOptional. A vsCMWhere value specifying whether the TextPoint object is the definition or the declaration.
Type: TextPoint
A TextPoint object.
EndPointOf retrieves text points with more precision than the StartPoint property.
This example adds a comment at the end of a code element declaration.
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
See How to: Compile Example Code for Visual C++ Code Model Extensibility for information on how to compile and run this sample.
- 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.