Label Property
Collapse the table of content
Expand the table of content
The document is archived and information here might be outdated

Label Property

Visual Studio .NET 2003

Returns the display name of the referenced assembly.

[Visual Basic .NET]
Public ReadOnly Property Label() As String
[Visual Basic 6]
Property Get Label() As String
HRESULT __stdcall get_Label(
   /* [out, retval] */ BSTR* retVal
public string Label {get;}
[JScript .NET]
public function get Label() : String

Return Value

A string representing the display name of the referenced assembly.


The following sample code lists the value of the Label property of the assembly reference:

' Add a reference to Microsoft.VisualStudio.VCProjectEngine and have a 
' Visual C++ .NET 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

See Samples for Project Model Extensibility for information on how to compile and run this sample.

See Also

Applies To: VCActiveXReference Object | VCAssemblyReference Object | VCProjectReference Object | VCReference Object

© 2016 Microsoft