Share via


Dictionary<TKey,TValue>.KeyCollection.ICollection<TKey>.IsReadOnly Properti

Definisi

Mendapatkan nilai yang menunjukkan apakah ICollection<T> bersifat baca-saja.

property bool System::Collections::Generic::ICollection<TKey>::IsReadOnly { bool get(); };
bool System.Collections.Generic.ICollection<TKey>.IsReadOnly { get; }
member this.System.Collections.Generic.ICollection<TKey>.IsReadOnly : bool
 ReadOnly Property IsReadOnly As Boolean Implements ICollection(Of TKey).IsReadOnly

Nilai Properti

trueICollection<T> jika bersifat baca-saja; jika tidak, false. Dalam implementasi Dictionary<TKey,TValue>.KeyCollectiondefault , properti ini selalu mengembalikan true.

Penerapan

Keterangan

Koleksi yang bersifat baca-saja tidak mengizinkan penambahan, penghapusan, atau modifikasi elemen setelah koleksi dibuat.

Mengambil nilai properti ini adalah operasi O(1).

Berlaku untuk