Aracılığıyla paylaş


Reference3.Name Özellik

Nesnenin adını alır.

Ad alanı:  VSLangProj80
Derleme:  VSLangProj80 (VSLangProj80.dll içinde)

Sözdizimi

'Bildirim
ReadOnly Property Name As String
    Get
string Name { get; }
property String^ Name {
    String^ get ();
}
abstract Name : string
function get Name () : String

Özellik Değeri

Tür: System.String
Döndürülen dize başvuru türüne göre değişir.

Başvuru türü

Döndürülen değer

Derleme

Dosya adı uzantısı olmadan başvuru derleme adı.

COM

Kapsayıcı adı dosya adı uzantısı olmadan başvurulan tür kitaplığı için.

Yüklenen

Reference2.Name

Açıklamalar

Bu özellik belirtir.Başvuru yapılan bir derleme adını Framework derleme olup net bir..NET Framework derleme veya com tür kitaplığı için bir sarıcı.

Örnekler

Bu örnekte ilk başvuru açık görüntüler Visual Basic veya Visual C# Proje. Bir eklenti bu örneği çalıştırmak için bkz: Nasıl Yapılır: derlemek ve otomasyon nesne modeli kod örnekleri çalıştırma.

Imports VSLangProj
Imports VSLangProj2
Imports VSLangProj80
Public Sub OnConnection(ByVal application As Object, _
 ByVal connectMode As ext_ConnectMode, ByVal addInInst As Object, _
 ByRef custom As Array) Implements IDTExtensibility2.OnConnection
    applicationObject = CType(application, DTE2)
    addInInstance = CType(addInInst, AddIn)
    GetName(applicationObject)
End Sub
Sub GetName(ByVal dte As DTE2)
    Dim aProject As Project
    Dim aVSProject As VSProject2
    ' The first project is a Visual Basic or C# project.
    aProject = applicationObject.Solution.Projects.Item(1)
    aVSProject = _
    CType(applicationObject.Solution.Projects.Item(1).Object, _
    VSProject2)
    Dim newRef As Reference3
    newRef = CType(aVSProject.References.Item(1), Reference3)
    MsgBox("The name of the first reference in the project is: " 
    & newRef.Name) 
End Sub
using System.Windows.Forms;
using VSLangProj;
using VSLangProj2;
using VSLangProj80;
public void OnConnection(object application,
 ext_ConnectMode connectMode, object addInInst, ref Array custom)
{
    applicationObject = (DTE2)application;
    addInInstance = (AddIn)addInInst;
    GetName(((DTE2)applicationObject));
}
public void GetName(DTE2 dte)
{
    // The first project is a Visual Basic or C# project.
VSProject2 aVSProject =
 ((VSProject2)(applicationObject.Solution.Projects.Item(1).Object));
    Reference3 aRef = null;
    aRef = ((Reference3)(aVSProject.References.Item(1)));
    MessageBox.Show("The name of the first reference in the project 
is: " + aRef.Name);
}

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

Reference3 Arabirim

Name Fazla Yük

VSLangProj80 Ad Alanı