IDictionary.Item Property

ReadOnlyDictionary(Of TKey, TValue).IDictionary.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
Private Property Item ( _
	key As Object _
) As Object Implements IDictionary.Item

Parameters

key
Type: System.Object
The key of the element to get.

Property Value

Type: System.Object
The element with the specified key.

Implements

IDictionary.Item(Object)

ExceptionCondition
ArgumentNullException

key is Nothing.

NotSupportedException

The property is set.

-or-

The property is set, key does not exist in the collection, and the dictionary has a fixed size.

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 interface.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft