IDictionary.IsReadOnly Properti

Definisi

Mendapatkan nilai yang menunjukkan apakah IDictionary objek bersifat baca-saja.

public:
 property bool IsReadOnly { bool get(); };
public bool IsReadOnly { get; }
member this.IsReadOnly : bool
Public ReadOnly Property IsReadOnly As Boolean

Nilai Properti

trueIDictionary jika objek bersifat baca-saja; jika tidak, false.

Contoh

Contoh kode berikut menunjukkan cara mengimplementasikan IsReadOnly properti . Contoh kode ini adalah bagian dari contoh yang lebih besar yang disediakan untuk IDictionary kelas .

public:
    property virtual bool IsReadOnly
    {
        bool get()
        {
            return false;
        }
    }
public bool IsReadOnly { get { return false; } }
Public ReadOnly Property IsReadOnly() As Boolean Implements IDictionary.IsReadOnly
    Get
        Return False
    End Get
End Property

Keterangan

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

Berlaku untuk