VCCodeStruct.Location[vsCMWhere] 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回对象声明的位置。
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
参数
属性值
对象声明的位置。
- 属性
示例
此示例显示包含每个顶级代码元素的声明的文件。
[Visual Basic]
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