This documentation is archived and is not being maintained.

IDictionaryEnumerator.Entry Property

When implemented by a class, gets both the key and the value of the current dictionary entry.

[Visual Basic]
ReadOnly Property Entry As DictionaryEntry
DictionaryEntry Entry {get;}
__property DictionaryEntry get_Entry();
function get Entry() : DictionaryEntry;

Property Value

A DictionaryEntry containing both the key and the value of the current dictionary entry.


Exception Type Condition
InvalidOperationException The IDictionaryEnumerator is positioned before the first entry of the dictionary or after the last entry.


The dictionary is modified after the IDictionaryEnumerator was created.


After an enumerator is created or after a Reset, MoveNext must be called to advance the enumerator to the first element of the collection before reading the value of Entry; otherwise, Entry is undefined.

Entry also throws an exception if the last call to MoveNext returned false, which indicates the end of the collection.

Entry does not move the position of the enumerator and consecutive calls to Entry return the same object until either MoveNext or Reset is called.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

IDictionaryEnumerator Interface | IDictionaryEnumerator Members | System.Collections Namespace | Reset | MoveNext | Key | Value