Item Property

ReadOnlyDictionary(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 that has the specified key.

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

'Declaration
Public ReadOnly Property Item ( _
	key As TKey _
) As TValue

Parameters

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

Property Value

Type: TValue
The element with the specified key.

Implements

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

ExceptionCondition
ArgumentNullException

key is Nothing.

KeyNotFoundException

The property is retrieved and key is not found.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft