Edit

Share via


IDictionary.IsReadOnly Property

Definition

Gets a value indicating whether the IDictionary object is read-only.

C#
public bool IsReadOnly { get; }

Property Value

true if the IDictionary object is read-only; otherwise, false.

Examples

The following code example demonstrates how to implement the IsReadOnly property. This code example is part of a larger example provided for the IDictionary class.

C#
public bool IsReadOnly { get { return false; } }

Remarks

A collection that is read-only does not allow the addition, removal, or modification of elements after the collection is created.

Applies to