Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

EndPointOf Property

Visual Studio .NET 2003

Returns the end point of the parent object.

[Visual Basic .NET]
Public ReadOnly Property EndPointOf( _
   ByVal Part As vsCMPart, _
   Optional ByVal Where As vsCMWhere = vsCMWhereDefault _
) As TextPoint
[Visual Basic 6]
Property Get EndPointOf( _
   ByVal Part As vsCMPart, _
   Optional ByVal Where As vsCMWhere = vsCMWhereDefault _
) As TextPoint
[C++]
HRESULT __stdcall get_EndPointOf(
   vsCMPart Part,
   vsCMWhere Where,
   /* [out, retval] */ TextPoint** retVal
);
[C#]
public TextPoint EndPointOf(
   vsCMPart Part,
   vsCMWhere Where
) {get;}
[JScript .NET]
public function get EndPointOf(
   Part : vsCMPart,
   Where : vsCMWhere
) : TextPoint

Parameters

Part
Required. A vsCMPart value specifying which part of the definition or the declaration to use (attributes block, body, and so on).
Where
Optional. A vsCMWhere value specifying whether the TextPoint object is the definition or the declaration.

Remarks

Retrieves text points with more precision than the StartPoint Property (General Extensibility).

Example

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 Samples for Visual C++ Code Model Extensibility for information on how to compile and run this sample.

See Also

Applies To: VCCodeAttribute Object | VCCodeBase Object | VCCodeClass Object | VCCodeDelegate Object | VCCodeElement Object | VCCodeEnum Object | VCCodeEvent Object | VCCodeFunction Object | VCCodeIDLCoClass Object | VCCodeIDLImport Object | VCCodeIDLImportLib Object | VCCodeIDLLibrary Object | VCCodeImport Object | VCCodeInclude Object | VCCodeInterface Object | VCCodeMacro Object | VCCodeMap Object | VCCodeMapEntry Object | VCCodeNamespace Object | VCCodeParameter Object | VCCodeProperty Object | VCCodeStruct Object | VCCodeTypedef Object | VCCodeUnion Object | VCCodeUsing Object | VCCodeVariable Object

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.