VCCodeIDLImport.Location Property
Gets the location of the object declaration.
Namespace: Microsoft.VisualStudio.VCCodeModel
Assembly: Microsoft.VisualStudio.VCCodeModel (in Microsoft.VisualStudio.VCCodeModel.dll)
声明
ReadOnly Property Location ( _
Where As vsCMWhere _
) As String
用法
Dim instance As VCCodeIDLImport
Dim Where As vsCMWhere
Dim value As String
value = instance.Location(Where)
string Location[
vsCMWhere Where
] { get; }
property String^ Location[[InAttribute] vsCMWhere Where] {
String^ get ([InAttribute] vsCMWhere Where);
}
JScript does not support indexed properties.
Where
Type: Microsoft.VisualStudio.VCCodeModel.vsCMWhereOptional. A vsCMWhere value specifying whether the location of the declaration or the definition is returned.
Type: System.String
The location of the object declaration.
See How to: Compile Example Code for Visual C++ Code Model Extensibility for information on how to compile and run this sample.
This example displays the file containing the declaration for each top-level code element.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.