Dictionary<TKey,TValue>.Enumerator.IDictionaryEnumerator.Entry プロパティ

定義

列挙子の現在位置の要素を取得します。

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

プロパティ値

ディクショナリ内の列挙子の現在位置にある、DictionaryEntry としての要素。

実装

例外

列挙子は、コレクションの最初の要素の前または最後の要素の後に配置されています。

注釈

IDictionaryEnumerator.Entry は、次のいずれかの条件で未定義です。

  • 列挙子は、コレクションの最初の要素の前に配置されます。 これは、列挙子が作成された後、または メソッドが呼び出された後に IEnumerator.Reset 発生します。 プロパティの MoveNext 値を読み取る前に、列挙子をコレクションの最初の要素に進めるために、 メソッドを呼び出す IDictionaryEnumerator.Entry 必要があります。

  • が返された falseMoveNext最後の呼び出し。これは、コレクションの末尾を示し、列挙子がコレクションの最後の要素の後に配置されることを示します。

  • 列挙子は、要素の追加、変更、削除など、コレクション内で行われた変更により無効になります。

IDictionaryEnumerator.Entryは列挙子の位置を移動せず、または IEnumerator.Reset が呼び出されるまで、連続して呼び出してIDictionaryEnumerator.Entry同じオブジェクトをMoveNext返します。

適用対象

こちらもご覧ください