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

속성 값

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

적용 대상