SortedDictionary<TKey,TValue>.Clear 메서드

정의

SortedDictionary<TKey,TValue>에서 요소를 모두 제거합니다.

public:
 virtual void Clear();
public void Clear ();
abstract member Clear : unit -> unit
override this.Clear : unit -> unit
Public Sub Clear ()

구현

설명

Count 속성은 0으로 설정되고 컬렉션 요소의 다른 개체에 대한 참조도 해제됩니다.

내부 데이터 구조의 루트가 가비지 수집을 위해 해제되기 때문에 이 메서드는 O(1) 작업입니다.

적용 대상