Redigeeri

Jagamisviis:


IDictionaryEnumerator.Entry Property

Definition

Gets both the key and the value of the current dictionary entry.

public:
 property System::Collections::DictionaryEntry Entry { System::Collections::DictionaryEntry get(); };
public System.Collections.DictionaryEntry Entry { get; }
member this.Entry : System.Collections.DictionaryEntry
Public ReadOnly Property Entry As DictionaryEntry

Property Value

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

Exceptions

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

Remarks

Entry is undefined under any of the following conditions:

  • The enumerator is positioned before the first element in the collection, immediately after the enumerator is created. MoveNext must be called to advance the enumerator to the first element of the collection before reading the value of Entry.

  • The last call to MoveNext returned false, which indicates the end of the collection.

  • The enumerator is invalidated due to changes made in the collection, such as adding, modifying, or deleting elements.

Entry returns the same object until MoveNext is called. MoveNext sets Entry to the next element.

Notes to Implementers

The Current property that is inherited from IEnumerator returns an Object that is a boxed DictionaryEntry. It is similar to the Entry property, except that Entry returns a DictionaryEntry rather than an Object.

Applies to

See also