Dictionary<TKey,TValue>.KeyCollection 생성자
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
지정된 Dictionary<TKey,TValue>.KeyCollection키를 반영하는 클래스의 Dictionary<TKey,TValue> 새 인스턴스를 초기화합니다.
public:
KeyCollection(System::Collections::Generic::Dictionary<TKey, TValue> ^ dictionary);
public KeyCollection(System.Collections.Generic.Dictionary<TKey,TValue> dictionary);
new System.Collections.Generic.Dictionary<'Key, 'Value>.KeyCollection : System.Collections.Generic.Dictionary<'Key, 'Value> -> System.Collections.Generic.Dictionary<'Key, 'Value>.KeyCollection
Public Sub New (dictionary As Dictionary(Of TKey, TValue))
매개 변수
- dictionary
- Dictionary<TKey,TValue>
Dictionary<TKey,TValue> 해당 키가 새 Dictionary<TKey,TValue>.KeyCollection키에 반영됩니다.
예외
dictionary은 null입니다.
설명
정 Dictionary<TKey,TValue>.KeyCollection 적 복사본 Dictionary<TKey,TValue>.KeyCollection 이 아니라 원래 Dictionary<TKey,TValue>의 키를 다시 참조합니다. 따라서 변경 내용이 Dictionary<TKey,TValue> 계속 에 반영됩니다 Dictionary<TKey,TValue>.KeyCollection.
이 생성자는 O(1) 작업입니다.