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

System.Collections.IDictionaryEnumerator.Entry Property

Gets the DictionaryEntry in the collection over which the current instance is positioned. [Edit]

public DictionaryEntry Entry { get; }

Value

The DictionaryEntry in the collection over which the current instance is positioned. [Edit]

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

[Edit]

Remarks

This property is read-only.

Operation
It is required that a call to IDictionaryEnumerator.Entry 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.

Usage
Use IDictionaryEnumerator.Entry to get the same data that would be provided by a call to IEnumerator.Current. Because this property is a DictionaryEntry, boxing is not required as it is for IEnumerator.Current; therefore, for this operation, IDictionaryEnumerator.Entry has reduced overhead compared to IEnumerator.Current.

[Edit]

Requirements

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