Share via


VCCodeAttribute.StartPointOf Property

Returns the start point of the parent object.

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

Syntax

'Declaration
ReadOnly Property StartPointOf ( _
    Part As vsCMPart, _
    Where As vsCMWhere _
) As TextPoint
TextPoint this[
    vsCMPart Part,
    vsCMWhere Where
] { get; }
property TextPoint^ StartPointOf[[InAttribute] vsCMPart Part, [InAttribute] vsCMWhere Where] {
    TextPoint^ get ([InAttribute] vsCMPart Part, [InAttribute] vsCMWhere Where);
}
abstract StartPointOf : 
        Part:vsCMPart * 
        Where:vsCMWhere -> TextPoint with get
JScript does not support indexed properties.

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).

Property Value

Type: EnvDTE.TextPoint
A TextPoint object.

Remarks

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

Examples

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

' Macro code.
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

.NET Framework Security

See Also

Reference

VCCodeAttribute Interface

Microsoft.VisualStudio.VCCodeModel Namespace