SortedSet<T>.GetEnumerator 方法

定义

返回循环访问的 SortedSet<T>枚举数。

public:
 System::Collections::Generic::SortedSet<T>::Enumerator GetEnumerator();
public System.Collections.Generic.SortedSet<T>.Enumerator GetEnumerator();
member this.GetEnumerator : unit -> System.Collections.Generic.SortedSet<'T>.Enumerator
Public Function GetEnumerator () As SortedSet(Of T).Enumerator

返回

循环访问排序顺序的 SortedSet<T> 枚举器。

注解

只要集合保持不变,枚举器就保持有效。 如果对集合进行了更改(例如添加、修改或删除元素),枚举器将不可恢复地失效,并且下次调用 MoveNextIEnumerator.Reset 时会引发 InvalidOperationException 异常。

此方法是一个 O(log n) 操作。

适用于