Mono Class Library: System.Collections.IDictionaryEnumerator Overview | Members

System.Collections.IDictionaryEnumerator.Key Property

Gets the DictionaryEntry.Key of the DictionaryEntry in the collection over which the current instance is positioned.

public object Key { get; }

Value

A object that contains the DictionaryEntry.Key of the DictionaryEntry in the collection over which the current instance is positioned.

Exceptions

TypeReason
InvalidOperationException

The IDictionaryEnumerator is positioned before the first element of the dictionary or after the last element.

-or-

The dictionary was modified after the IDictionaryEnumerator was instantiated.

Remarks

This property is read-only.

Operation
It is required that reading IDictionaryEnumerator.Key leave the position of the enumerator unchanged: consecutive calls to this property are required to return the same object until IEnumerator.MoveNext or IEnumerator.Reset is called.

Requirements

Namespace: System.Collections
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0