Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

VCCodeImport.EndPointOf Property 

Gets the end point of the object.

Namespace: Microsoft.VisualStudio.VCCodeModel
Assembly: Microsoft.VisualStudio.VCCodeModel (in microsoft.visualstudio.vccodemodel.dll)

TextPoint EndPointOf [
	[InAttribute] vsCMPart Part,
	[OptionalAttribute] [InAttribute] vsCMWhere Where
] { get; }
/** @property */
TextPoint get_EndPointOf (/** @attribute InAttribute() */ vsCMPart Part, /** @attribute InAttribute() */ /** @attribute OptionalAttribute() */ vsCMWhere Where)

JScript supports the use of indexed properties, but not the declaration of new ones.

Parameters

Part

Required. A vsCMPart value specifying which part of the definition or the declaration to use (attributes block, body, and so on).

Property Value

A TextPoint object.

EndPointOf retrieves text points with more precision than the StartPoint property.

See Samples for Visual C++ Code Model Extensibility for information on how to compile and run this sample.

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
Show:
© 2015 Microsoft