Edit

Share via


ReadOnlyDictionary<K,V>.Item[K] Property

Definition

Gets the element with the specified key.

public:
 property V default[K] { V get(K key); void set(K key, V value); };
public V this[K key] { get; set; }
member this.Item('K) : 'V with get, set
Default Public Property Item(key As K) As V

Parameters

key
K

The key of the element to get.

Property Value

V

The element with the specified key.

Implements

Exceptions

Thrown when an attempt is made to set this property.

Thrown when key is null.

Thrown when the property is retrieved and no key is found.

Applies to