Hashtable.Values 属性

定义

获取一个 ICollection,它包含 Hashtable 中的值。

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

属性值

一个 ICollection,它包含 Hashtable 中的值。

实现

注解

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

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

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

适用于

另请参阅