Condividi tramite


Proprietà VCCodeAttribute.EndPointOf

Restituisce la posizione finale dell'oggetto padre.

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

Sintassi

'Dichiarazione
ReadOnly Property EndPointOf ( _
    Part As vsCMPart, _
    Where As vsCMWhere _
) As TextPoint
TextPoint this[
    vsCMPart Part,
    vsCMWhere Where
] { get; }
property TextPoint^ EndPointOf[[InAttribute] vsCMPart Part, [InAttribute] vsCMWhere Where] {
    TextPoint^ get ([InAttribute] vsCMPart Part, [InAttribute] vsCMWhere Where);
}
abstract EndPointOf : 
        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

EndPointOf recupera i punti di testo con maggiore precisione rispetto StartPoint proprietà.

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 alla fine di una dichiarazione di un elemento di codice.

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

Sicurezza di .NET Framework

Vedere anche

Riferimenti

VCCodeAttribute Interfaccia

Spazio dei nomi Microsoft.VisualStudio.VCCodeModel