PostSharp6.3/API Reference/Post­Sharp.​Patterns.​Collections Namespace/Advisable­Keyed­Collection(TKey, TItem) Class/Advisable­Keyed­Collection(TKey, TItem) Properties/Advisable­Keyed­Collection(TKey, TItem).​Item Property/Advisable­Keyed­Collection(TKey, TItem).​Item Property (TKey)

AdvisableKeyedCollection<TKey, TItem>.Item Property (TKey)

Gets or sets the element with the specified key.

Namespace:  PostSharp.Patterns.Collections
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 6.3.11.0 (6.3.11.0)
Syntax
C#
public TItem this[
	TKey key
] { get; set; }

Parameters

key
Type: TKey
The key of the element.

Return Value

Type: TItem
The element whose key is key.
Exceptions
ExceptionCondition
ArgumentExceptionThrown 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.
Remarks
When setting this property, the key of the new value should be identical to the value of the key parameter.
See Also