Export (0) Print
Expand All

VCCodeParameter.StartPointOf Property

Gets the start point of the object.

Namespace:  Microsoft.VisualStudio.VCCodeModel
Assembly:  Microsoft.VisualStudio.VCCodeModel (in Microsoft.VisualStudio.VCCodeModel.dll)

TextPoint this[
	vsCMPart Part,
	vsCMWhere Where
] { get; }

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.

Property Value

Type: EnvDTE.TextPoint
The start point of the object.

See How to: Compile Example Code for Visual C++ Code Model Extensibility for information on how to compile and run this sample.

This example adds a comment at the beginning of a code element declaration.

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

Community Additions

ADD
Show:
© 2014 Microsoft