VSProject.References Özellik

Tanım

ReferencesProjenin koleksiyonunu alır. Salt okunur.

public:
 property VSLangProj::References ^ References { VSLangProj::References ^ get(); };
[System.Runtime.InteropServices.DispId(1)]
public VSLangProj.References References { [System.Runtime.InteropServices.DispId(1)] get; }
[<System.Runtime.InteropServices.DispId(1)>]
[<get: System.Runtime.InteropServices.DispId(1)>]
member this.References : VSLangProj.References
Public ReadOnly Property References As References

Özellik Değeri

References

References Reference Her biri bir başvuruyu temsil eden nesneleri içeren bir koleksiyon.

Öznitelikler

Örnekler

[Visual Basic]

' Macro Editor  
' Assuming that the first project in the solution is a Visual Basic or C#  
' application, this routine lists the references in the project.  
Imports VSLangProj  
Sub ListReferences()  
   ' Retrieve the VSProject object.  
   Dim theVSProject As VSProject = _  
      CType(DTE.Solution.Projects.Item(1).Object, VSProject)  

   ' Retrieve the references collection.  
   Dim refs As References = theVSProject.References  

   ' Create a string list of the reference names.  
   Dim refList As String = ""  
   Dim aRef As Reference  
   For Each aRef In refs  
      refList &= aRef.Identity & ControlChars.CrLf  
   Next  
   MsgBox(refList)  
End Sub  

Açıklamalar

Bir dış bileşene karşı kod yazmak için projenizin önce bu bileşene bir başvuru içermesi gerekir. Üç tür bileşene bir başvuru yapılabilir: .NET derlemeleri, COM Otomasyon sunucuları ve denetimleri ve bileşenleri kullanıma sunan aynı çözüm içindeki diğer projeler.

Şunlara uygulanır