VCCodeEnum.StartPointOf[vsCMPart, vsCMWhere] Eigenschaft

Definition

Ruft den Startpunkt des übergeordneten Objekts ab.

public:
 property EnvDTE::TextPoint ^ StartPointOf[EnvDTE::vsCMPart, Microsoft::VisualStudio::VCCodeModel::vsCMWhere] { EnvDTE::TextPoint ^ get(EnvDTE::vsCMPart Part, Microsoft::VisualStudio::VCCodeModel::vsCMWhere Where); };
[System.Runtime.InteropServices.DispId(550)]
public EnvDTE.TextPoint StartPointOf[EnvDTE.vsCMPart Part, Microsoft.VisualStudio.VCCodeModel.vsCMWhere Where = Microsoft.VisualStudio.VCCodeModel.vsCMWhere.vsCMWhereDefault] { [System.Runtime.InteropServices.DispId(550)] [System.Runtime.InteropServices.TypeLibFunc(System.Runtime.InteropServices.TypeLibFuncFlags.FNonBrowsable)] get; }
[<System.Runtime.InteropServices.DispId(550)>]
[<get: System.Runtime.InteropServices.DispId(550)>]
[<get: System.Runtime.InteropServices.TypeLibFunc(System.Runtime.InteropServices.TypeLibFuncFlags.FNonBrowsable)>]
member this.StartPointOf(EnvDTE.vsCMPart * Microsoft.VisualStudio.VCCodeModel.vsCMWhere) : EnvDTE.TextPoint
Public ReadOnly Property StartPointOf(Part As vsCMPart, Optional Where As vsCMWhere = Microsoft.VisualStudio.VCCodeModel.vsCMWhere.vsCMWhereDefault) As TextPoint

Parameter

Part
vsCMPart

Erforderlich. Ein vsCMPart-Wert, der angibt, welcher Teil der Definition oder Deklaration verwendet werden soll (Attributblock, Textkörper usw.).

Where
vsCMWhere

(Optional) Ein vsCMWhere-Wert, der angibt, ob das TextPoint-Objekt die Definition oder die Deklaration darstellt.

Eigenschaftswert

TextPoint

Ein TextPoint-Objekt.

Attribute

Beispiele

In diesem Beispiel wird am Anfang der Deklaration eines Code Elements ein Kommentar hinzugefügt.

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  

Hinweise

Weitere Informationen zum Kompilieren und Ausführen dieses Beispiels finden Sie unter Gewusst wie: Kompilieren von Beispielcode für die Erweiterbarkeit von Visual C++-Code Modellen .

Gilt für