SortedList.Keys 屬性

定義

取得 SortedList 物件中的索引鍵。

public:
 virtual property System::Collections::ICollection ^ Keys { System::Collections::ICollection ^ get(); };
public virtual System.Collections.ICollection Keys { get; }
member this.Keys : System.Collections.ICollection
Public Overridable ReadOnly Property Keys As ICollection

屬性值

ICollection 物件,其中包含 SortedList 物件中的索引鍵。

實作

備註

對象 ICollection 是物件索引鍵的 SortedList 唯讀檢視。 對基礎 SortedList 所做的修改會立即反映在 中 ICollection

的專案 ICollection 會以與的索引鍵 SortedList相同順序排序。

這個屬性與 GetKeyList 方法類似,但會 ICollection 傳回 物件,而不是 IList 物件。

這個方法是作業 O(1)

適用於

另請參閱