Share via


ReadOnlyDictionary<TKey, TValue>.Item property

Gets the value associated with the specified key.

Namespace:  Microsoft.SharePoint.Taxonomy.Generic
Assembly:  Microsoft.SharePoint.Taxonomy (in Microsoft.SharePoint.Taxonomy.dll)

Syntax

'Declaration
Public ReadOnly Default Property Item ( _
    key As TKey _
) As TValue
    Get
'Usage
Dim instance As ReadOnlyDictionary
Dim key As TKey
Dim value As TValue

value = instance(key)
public TValue this[
    TKey key
] { get; }

Parameters

  • key
    Type: TKey

    The key of the value to get

Property value

Type: TValue
The value associated with the specified key. If the specified key is not found, a get operation throws a KeyNotFoundException.

Exceptions

Exception Condition
KeyNotFoundException

The key does not exist in the collection

ArgumentNullException

key is a a null reference (Nothing in Visual Basic) reference

See also

Reference

ReadOnlyDictionary<TKey, TValue> class

ReadOnlyDictionary<TKey, TValue> members

Microsoft.SharePoint.Taxonomy.Generic namespace