IDictionary(TKey, TValue).Item Property

ReadOnlyDictionary(Of TKey, TValue).IDictionary(Of TKey, TValue).Item Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets the element with the specified key.

Namespace:  System.Collections.ObjectModel
Assembly:  mscorlib (in mscorlib.dll)

'Declaration
Private Property Item ( _
	key As TKey _
) As TValue Implements IDictionary(Of TKey, TValue).Item

Parameters

key
Type: TKey
The key of the element to get or set.

Property Value

Type: TValue
The element with the specified key.

Implements

IDictionary(Of TKey, TValue).Item(TKey)

ExceptionCondition
ArgumentNullException

key is Nothing.

KeyNotFoundException

The property is retrieved and key is not found.

NotSupportedException

The property is set.

This member is an explicit interface member implementation. It can be used only when the ReadOnlyDictionary(Of TKey, TValue) instance is cast to an IDictionary(Of TKey, TValue) interface.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft