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

属性值

包含中键的ICollection一个 Hashtable

实现

注解

未指定键ICollection的顺序,但它与方法返回ICollection的关联值Values的顺序相同。

返回的 ICollection 不是静态副本;而是 ICollection 引用原始 Hashtable副本中的键。 因此,对 Hashtable 继续所做的更改将反映在中 ICollection

检索此属性的值是一项 O(1) 操作。

适用于

另请参阅