VCProjectReference.ItemName 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取集合中当前项的名称。
public:
property System::String ^ ItemName { System::String ^ get(); };
public:
property Platform::String ^ ItemName { Platform::String ^ get(); };
[System.Runtime.InteropServices.DispId(678)]
public string ItemName { [System.Runtime.InteropServices.DispId(678)] get; }
[<System.Runtime.InteropServices.DispId(678)>]
[<get: System.Runtime.InteropServices.DispId(678)>]
member this.ItemName : string
Public ReadOnly Property ItemName As String
属性值
集合中当前项的名称。
实现
- 属性
示例
有关如何编译和运行此示例的信息,请参阅 如何:编译项目模型扩展性的示例代码 。
下面的示例使用 ItemName 开发环境中的属性:
' add reference to Microsoft.VisualStudio.VCProjectEngine
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine
Public Module Module1
Sub Test()
Dim mycollection As IVCCollection
Dim file As VCFile
Dim prj As VCProject
prj = DTE.Solution.Projects.Item(1).Object
mycollection = prj.Files
'mycollection.Count has count of files
file = mycollection.Item(1)
' file.ItemName has file name
End Sub
End Module