IDictionary<TKey, TValue>.Item IDictionary<TKey, TValue>.Item IDictionary<TKey, TValue>.Item IDictionary<TKey, TValue>.Item Property

Definition

Gets or sets the element with the specified key.

// This member is not implemented in C++/CX
TValue this[TKey key] { get; set; }
Property Item(key As TKey) As TValue
TValue this[TKey key] { get; set; }
Parameters
key
TKey TKey TKey TKey

The key of the element to get or set.

Property Value
TValue TValue TValue TValue

The element with the specified key.

Exceptions

key is null.

The property is retrieved and key is not found.

The property is set and the System.Collections.Generic.IDictionary`2 is read-only.

See Also

  • System.Collections.Generic.IDictionary`2.Add(`0,`1)
  • System.Collections.Generic.IDictionary`2.ContainsKey(`0)
  • System.Collections.Generic.ICollection`1.IsReadOnly