Share via


SortedDictionary<TKey,TValue>.Enumerator.IDictionaryEnumerator.Entry Properti

Definisi

Mendapatkan elemen pada posisi enumerator saat ini sebagai DictionaryEntry struktur.

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

Nilai Properti

Elemen dalam koleksi pada posisi kamus saat ini, sebagai DictionaryEntry struktur.

Penerapan

Pengecualian

Enumerator diposisikan sebelum elemen pertama koleksi atau setelah elemen terakhir.

Keterangan

IDictionaryEnumerator.Entry tidak ditentukan dalam salah satu kondisi berikut:

  • Enumerator diposisikan sebelum elemen pertama koleksi. Itu terjadi setelah enumerator dibuat atau setelah metode dipanggil IEnumerator.Reset . Metode MoveNext harus dipanggil untuk memajukan enumerator ke elemen pertama koleksi sebelum membaca nilai IDictionaryEnumerator.Entry properti .

  • Panggilan terakhir untuk MoveNext dikembalikan false, yang menunjukkan akhir koleksi dan bahwa enumerator diposisikan setelah elemen terakhir koleksi.

  • Enumerator tidak valid karena perubahan yang dibuat dalam koleksi, seperti menambahkan, memodifikasi, atau menghapus elemen.

IDictionaryEnumerator.Entry tidak memindahkan posisi enumerator, dan panggilan berturut-turut untuk IDictionaryEnumerator.Entry mengembalikan objek yang sama hingga atau MoveNextIEnumerator.Reset dipanggil.

Berlaku untuk

Lihat juga