C# Hashtable IsReadOnly

Description

Hashtable IsReadOnly gets a value indicating whether the Hashtable is read-only.

Syntax

Hashtable.IsReadOnly has the following syntax.


public virtual bool IsReadOnly { get; }

Example


using System;//from w  ww  . ja v a 2  s . co m
using System.Collections;

class MainClass
{
    public static void Main()
    {
        Hashtable    hash = new Hashtable();
        hash.Add("A", "1");
        hash.Add("B", "2");
        hash.Add("C", "3");
        hash.Add("D", "4");
        hash.Add("E", "5");
        
        Console.WriteLine(hash.IsReadOnly);

    }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Collections »




ArrayList
BitArray
Comparer
Hashtable
Queue
SortedList
Stack