C# SortedList IsReadOnly

Description

SortedList IsReadOnly gets a value indicating whether a SortedList object is read-only.

Syntax

SortedList.IsReadOnly has the following syntax.


public virtual bool IsReadOnly { get; }

Example


using System; /*from  www .  j  a v a2 s  .  c om*/
using System.Collections; 
 
class MainClass { 
  public static void Main() { 
    SortedList sl = new SortedList(); 
     
    sl.Add("a", "A"); 
    sl.Add("b", "B"); 
    sl.Add("c", "C"); 
    sl.Add("d", "D"); 
 
    Console.WriteLine(sl.IsReadOnly); 
  }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Collections »




ArrayList
BitArray
Comparer
Hashtable
Queue
SortedList
Stack