When implemented by a class, retrieves the value of the current dictionary entry.
[Visual Basic] ReadOnly Property Value As Object [C#] object Value {get;} [C++] Object* get_Value() = 0; [JScript] abstract function get Value() : Object;
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.
OR, the dictionary is modified after the IDictionaryEnumerator was created. |
After an enumerator is created or after a call to Reset, MoveNext must be called to advance the enumerator to the first entry of the dictionary before calling the Value method.
Value will also throw 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 multiple calls to Value will return the same object until either MoveNext or Reset is called.
IDictionaryEnumerator Interface | IDictionaryEnumerator Members | System.Collections Namespace | Reset | MoveNext | Key