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)

適用於