PropertyCollection.IDictionary.IsReadOnly Eigenschaft

Definition

Ruft einen Wert ab, der angibt, ob das IDictionary schreibgeschützt ist.

property bool System::Collections::IDictionary::IsReadOnly { bool get(); };
bool System.Collections.IDictionary.IsReadOnly { get; }
member this.System.Collections.IDictionary.IsReadOnly : bool
 ReadOnly Property IsReadOnly As Boolean Implements IDictionary.IsReadOnly

Eigenschaftswert

true, wenn das IDictionary-Objekt schreibgeschützt ist, andernfalls false.

Implementiert

Beispiele

Im folgenden Beispiel wird gezeigt, wie die -Eigenschaft implementiert wird IsReadOnly . Dieses Codebeispiel ist Teil eines größeren Beispiels, das für die IDictionary-Klasse bereitgestellt wird.

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

Hinweise

Eine schreibgeschützte Auflistung gestattet nach dem Erstellen der Auflistung weder das Hinzufügen noch das Ändern oder Entfernen von Elementen.

Gilt für: