CodeNamespaceImportCollection.Count 属性

定义

获取集合中命名空间的数目。

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

适用于