VCCodeProperty.Location[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 l'emplacement de la déclaration de l'objet.
public:
property System::String ^ Location[Microsoft::VisualStudio::VCCodeModel::vsCMWhere] { System::String ^ get(Microsoft::VisualStudio::VCCodeModel::vsCMWhere Where); };
[System.Runtime.InteropServices.DispId(549)]
public string Location[Microsoft.VisualStudio.VCCodeModel.vsCMWhere Where = Microsoft.VisualStudio.VCCodeModel.vsCMWhere.vsCMWhereDefault] { [System.Runtime.InteropServices.DispId(549)] get; }
[<System.Runtime.InteropServices.DispId(549)>]
[<get: System.Runtime.InteropServices.DispId(549)>]
member this.Location(Microsoft.VisualStudio.VCCodeModel.vsCMWhere) : string
Public ReadOnly Property Location(Optional Where As vsCMWhere = Microsoft.VisualStudio.VCCodeModel.vsCMWhere.vsCMWhereDefault) As String
Paramètres
- Where
- vsCMWhere
Facultatif. Valeur vsCMWhere indiquant si l'emplacement de la définition ou de la déclaration est retourné.
Valeur de propriété
Emplacement de la déclaration de l'objet.
- Attributs
Exemples
Cet exemple affiche le fichier contenant la déclaration pour chaque élément de code de niveau supérieur.
Sub DisplayLocation()
Dim vcCM As VCCodeModel
Dim vcCodeElement As VCCodeElement
vcCM = DTE.Solution.Item(1).CodeModel
For Each vcCodeElement In vcCM.CodeElements
MsgBox(vcCodeElement.Name + " is declared in " + vcCodeElement.Location)
Next
End Sub
Remarques
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 .