VCAssemblyReference.Label 属性

定义

获取已引用程序集的显示名称。

public:
 property System::String ^ Label { System::String ^ get(); };
public:
 property Platform::String ^ Label { Platform::String ^ get(); };
[System.Runtime.InteropServices.DispId(2001)]
public string Label { [System.Runtime.InteropServices.DispId(2001)] get; }
[<System.Runtime.InteropServices.DispId(2001)>]
[<get: System.Runtime.InteropServices.DispId(2001)>]
member this.Label : string
Public ReadOnly Property Label As String

属性值

String

已引用程序集的显示名称。

实现

属性

示例

下面的示例代码列出了 Label 程序集引用的属性值:

' Add a reference to Microsoft.VisualStudio.VCProjectEngine and have a   
' Visual C++ project loaded before running this example.  
Imports EnvDTE  
Imports Microsoft.VisualStudio.VCProjectEngine  

Public Module Module1  
    Sub Test()  
        Dim prj As VCProject  
        Dim vcar As VCAssemblyReference  
        prj = DTE.Solution.Projects.Item(1).Object  
        vcar = prj.VCReferences.item(1)   
        MsgBox("Label: " & vcar.Label)  
    End Sub  
End Module  

注解

有关如何编译和运行此示例的信息,请参阅 如何:编译项目模型扩展性的示例代码

适用于