Udostępnij za pośrednictwem


References.Count Property

Definition

Gets a value indicating the number of objects in the collection. Read-only.

public:
 property int Count { int get(); };
public:
 property int Count { int get(); };
[System.Runtime.InteropServices.DispId(4)]
public int Count { [System.Runtime.InteropServices.DispId(4)] get; }
[<System.Runtime.InteropServices.DispId(4)>]
[<get: System.Runtime.InteropServices.DispId(4)>]
member this.Count : int
Public ReadOnly Property Count As Integer

Property Value

The number of objects in the collection.

Attributes

Examples

' Macro Editor  
' This method creates string with a list of all the references  
' by index in a References collection.  
Imports VSLangProj  
Function ListReferences(ByVal refs As References) _  
   As String  
   Dim i As Integer  
   Dim list As String = ""  
   For i = 1 To refs.Count  
      list &= i.ToString() & " " & refs.Item(i).Identity & " " & _  
         ControlChars.CrLf   
   Next  
   Return list  
End Function  

Applies to