OrderedDictionary<TKey,TValue>.Item[TKey] Property

Definition

Gets or sets the element with the specified key.

C#
public TValue this[TKey key] { get; set; }

Parameters

key
TKey

The key of the element to get or set.

Property Value

TValue

The element with the specified key.

Implements

Exceptions

key is null.

The property is retrieved and key does not exist in the collection.

Remarks

Setting the value of an existing key does not impact its order in the collection.

Applies to

Product Versions
.NET 9