Value Property
Collapse the table of content
Expand the table of content

IDictionaryEnumerator.Value Property

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

[Visual Basic]
ReadOnly Property Value As Object
object Value {get;}
__property Object* get_Value();
function get Value() : Object;

Property Value

The value of the current element of the enumeration.


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 Value; otherwise, Value is undefined.

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

Value does not move the position of the enumerator and consecutive calls to Value 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 | Entry

© 2015 Microsoft