Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

OrderedHashtable Class

Definition

Namespace:
System.Management.Automation
Assembly:
System.Management.Automation.dll
Package:
System.Management.Automation v7.4.15
Package:
System.Management.Automation v7.5.6
Package:
System.Management.Automation v7.6.1

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

OrderedHashtable is a hashtable that preserves the order of the keys.

[System.Runtime.CompilerServices.Nullable(0)]
public sealed class OrderedHashtable : System.Collections.Hashtable
[<System.Runtime.CompilerServices.Nullable(0)>]
type OrderedHashtable = class
 inherit Hashtable
 interface IEnumerable
Public NotInheritable Class OrderedHashtable
Inherits Hashtable
Inheritance
OrderedHashtable
Attributes
Implements

Constructors

Name Description
OrderedHashtable()

Initializes a new instance of the OrderedHashtable class.

OrderedHashtable(IDictionary)

Initializes a new instance of the OrderedHashtable class.

OrderedHashtable(Int32)

Initializes a new instance of the OrderedHashtable class.

Properties

Name Description
Count

Get the number of items in the hashtable.

IsFixedSize

Get if the hashtable is a fixed size.

IsReadOnly

Get if the hashtable is read-only.

IsSynchronized

Get if the hashtable is synchronized.

Item[Object]

Gets or sets the value associated with the specified key.

Keys

Gets the keys in the hashtable.

Values

Gets the values in the hashtable.

Methods

Name Description
Add(Object, Object)

Adds the specified key and value to the hashtable.

Clear()

Removes all keys and values from the hashtable.

Clone()

Get a shallow clone of the hashtable.

Contains(Object)

Determines whether the hashtable contains a specific key.

ContainsKey(Object)

Determines whether the hashtable contains a specific key.

ContainsValue(Object)

Determines whether the hashtable contains a specific value.

CopyTo(Array, Int32)

Copies the elements of the hashtable to an array of type object, starting at the specified array index.

GetEnumerator()

Get the enumerator.

Remove(Object)

Removes the specified key from the hashtable.

Explicit Interface Implementations

Name Description
IEnumerable.GetEnumerator()

Get the enumerator.

Applies to