C# OrderedDictionary IsReadOnly
Description
OrderedDictionary IsReadOnly
gets a value indicating
whether the OrderedDictionary collection is read-only.
Syntax
OrderedDictionary.IsReadOnly
has the following syntax.
public bool IsReadOnly { get; }
Example
using System;//from w ww . j ava2s .c om
using System.Collections;
using System.Collections.Specialized;
public class SamplesStringCollection {
public static void Main() {
OrderedDictionary myOrderedDictionary = new OrderedDictionary();
myOrderedDictionary.Add("testKey1", "testValue1");
myOrderedDictionary.Add("testKey2", "testValue2");
myOrderedDictionary.Add("keyToDelete", "valueToDelete");
myOrderedDictionary.Add("testKey3", "testValue3");
Console.WriteLine( myOrderedDictionary.IsReadOnly);
}
}
The code above generates the following result.