CodeNamespaceImportCollection.Count 屬性

定義

取得集合中的命名空間 (Namespace) 數目。

public:
 property int Count { int get(); };
public int Count { get; }
member this.Count : int
Public ReadOnly Property Count As Integer

屬性值

集合中的命名空間數目。

實作

範例

下列程式代碼會取得物件中的 CodeNamespaceImportCollection 項目計數。

// Retrieves the count of the items in the collection.
int collectionCount = collection->Count;
// Retrieves the count of the items in the collection.
int collectionCount = collection.Count;
' Retrieves the count of the items in the collection.
Dim collectionCount As Integer = collection.Count

適用於