SortedSet<T>.GetEnumerator 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳一個遍歷 的 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> 枚舉器。
備註
只要集合未曾改變,列舉器仍然有效。 若對集合進行變更,例如新增、修改或刪除元素,列舉子將無法恢復地失效,下一次呼叫 MoveNext 或 IEnumerator.Reset 會拋 InvalidOperationException出 。
此方法為操作 O(log n) 。