Lookup<TKey,TElement>.Count プロパティ

定義

Lookup<TKey,TElement> 内のキーと値コレクションのペアの数を取得します。

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

プロパティ値

Int32

Lookup<TKey,TElement> 内のキーと値コレクションのペアの数。

実装

次の例では、キーと値のコレクションペアの数を決定するために使用 Count する方法を Lookup<TKey,TElement>示します。 このコード例は、Lookup<TKey,TElement> クラスのために提供されている大規模な例の一部です。

// Get the number of key-collection pairs in the Lookup.
int count = lookup.Count;
' Get the number of key-collection pairs in the Lookup.
Dim count As Integer = lookup.Count

注釈

オブジェクトの作成後に項目を Count 追加または削除できないため、プロパティの Lookup<TKey,TElement> 値は変更されません。

適用対象