語言

Hashtable.Keys 屬性

定義

取得 且ICollection包含 的 鍵。Hashtable

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

屬性值

an ICollection 包含 Hashtable.

實作

備註

鍵ICollection的順序未明確說明,但與方法回傳ICollection的相關值Values順序相同。

返回 ICollection 的 不是靜態副本;而是 ICollection 回溯到原始 Hashtable的金鑰。 因此,變化 Hashtable 會持續反映在 ICollection中。

取得該屬性的價值是一個 O(1) 操作。

適用於

另請參閱