Condividi tramite


Proprietà VCCodeClass.StartPointOf

Restituisce la posizione iniziale dell'oggetto padre.

Spazio dei nomi:  Microsoft.VisualStudio.VCCodeModel
Assembly:  Microsoft.VisualStudio.VCCodeModel (in Microsoft.VisualStudio.VCCodeModel.dll)

Sintassi

'Dichiarazione
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 non supporta le proprietà indicizzate.

Parametri

  • Part
    Tipo: EnvDTE.vsCMPart
    obbligatorio.In vsCMPart stimare specificare quale parte della definizione o la dichiarazione da utilizzare (blocco di attributi, corpo, e così via).

Valore proprietà

Tipo: EnvDTE.TextPoint
In TextPoint oggetto.

Note

vedere Procedura: compilare codice di esempio per l'Extensibility del modello di codice di Visual C++ per informazioni su come compilare ed eseguire l'esempio.

Esempi

In questo esempio viene aggiunto un commento all'inizio della dichiarazione di un elemento di codice.

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

Sicurezza di .NET Framework

Vedere anche

Riferimenti

VCCodeClass Interfaccia

Spazio dei nomi Microsoft.VisualStudio.VCCodeModel