VCCodeElement.EndPointOf[vsCMPart, vsCMWhere] Propriété
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Retourne le point de terminaison de l'objet VCCodeElement.
public:
property EnvDTE::TextPoint ^ EndPointOf[EnvDTE::vsCMPart, Microsoft::VisualStudio::VCCodeModel::vsCMWhere] { EnvDTE::TextPoint ^ get(EnvDTE::vsCMPart Part, Microsoft::VisualStudio::VCCodeModel::vsCMWhere Where); };
[System.Runtime.InteropServices.DispId(551)]
public EnvDTE.TextPoint EndPointOf[EnvDTE.vsCMPart Part, Microsoft.VisualStudio.VCCodeModel.vsCMWhere Where = Microsoft.VisualStudio.VCCodeModel.vsCMWhere.vsCMWhereDefault] { [System.Runtime.InteropServices.DispId(551)] [System.Runtime.InteropServices.TypeLibFunc(System.Runtime.InteropServices.TypeLibFuncFlags.FNonBrowsable)] get; }
[<System.Runtime.InteropServices.DispId(551)>]
[<get: System.Runtime.InteropServices.DispId(551)>]
[<get: System.Runtime.InteropServices.TypeLibFunc(System.Runtime.InteropServices.TypeLibFuncFlags.FNonBrowsable)>]
member this.EndPointOf(EnvDTE.vsCMPart * Microsoft.VisualStudio.VCCodeModel.vsCMWhere) : EnvDTE.TextPoint
Public ReadOnly Property EndPointOf(Part As vsCMPart, Optional Where As vsCMWhere = Microsoft.VisualStudio.VCCodeModel.vsCMWhere.vsCMWhereDefault) As TextPoint
Paramètres
- Part
- vsCMPart
Obligatoire. Valeur vsCMPart indiquant quelle partie de la définition ou de la déclaration doit être utilisée (blocs d'attributs, corps etc.).
- Where
- vsCMWhere
Facultatif. Valeur vsCMWhere indiquant si l'objet TextPoint est la définition ou la déclaration.
Valeur de propriété
Objet TextPoint.
- Attributs
Exemples
Cet exemple ajoute un commentaire à la fin d’une déclaration d’élément de code.
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
Remarques
EndPointOf[] Récupère des points de texte avec une plus grande précision que la StartPoint propriété.
Pour plus d’informations sur la compilation et l’exécution de cet exemple, consultez Comment : compiler un exemple de code pour Visual C++ extensibilité du modèle de code .