Export (0) Print
Expand All

Hashtable.Keys Property

Gets an ICollection containing the keys in the Hashtable.

[Visual Basic]
Public Overridable ReadOnly Property Keys As ICollection  _
   Implements IDictionary.Keys
[C#]
public virtual ICollection Keys {get;}
[C++]
public: __property virtual ICollection* get_Keys();
[JScript]
public function get Keys() : ICollection;

Property Value

An ICollection containing the keys in the Hashtable.

Implements

IDictionary.Keys

Remarks

The order of the keys in the ICollection is unspecified, but it is the same order as the associated values in the ICollection returned by the Values method.

The returned ICollection is not a static copy; instead, the ICollection refers back to the keys in the original Hashtable. Therefore, changes to the Hashtable continue to be reflected in the ICollection.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

Hashtable Class | Hashtable Members | System.Collections Namespace | ICollection | Values

Show:
© 2014 Microsoft