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> 제거할 수 없으므로 속성 값은 변경되지 않습니다.

적용 대상