PostSharp//API Reference/Post­Sharp.​Patterns.​Collections/Advisable­Dictionary<TKey, TValue>/Item
Open sandboxFocus

Property Item

Item[TKey]

Gets or sets the element with the specified key.

Declaration
public TValue this[TKey key] { get; set; }
Parameters
Type Name Description
TKey key

The key of the element to get or set.

Property Value
Type Description
TValue

The element with the specified key.

Exceptions
Type Condition
ArgumentNullException

key is null.

KeyNotFoundException

The property is retrieved and key is not found.

NotSupportedException

The property is set and the IDictionary<TKey,TValue> is read-only.