PostSharpAPI ReferencePost­Sharp.​Patterns.​CollectionsAdvisable­Keyed­Collection<TKey, TItem>Item
Open sandboxFocus

AdvisableKeyedCollection<TKey, TItem>.Item Property

Item[TKey]

Gets or sets the element with the specified key.

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

The key of the element.

Property Value
Type Description
TItem

The element whose key is key.

Remarks

When setting this property, the key of the new value should be identical to the value of the key parameter.

Exceptions
Type Condition
ArgumentException

Thrown when the element whose key is key is not present or when the key of the new value is not identical to the value of the key parameter.