Check if the Hashtable has a fixed size in CSharp

Description

The following code shows how to check if the Hashtable has a fixed size.

Example


/*from   w  ww  .jav a 2 s  .co  m*/
using System;
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.IsFixedSize);

    }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    Collections »




ArrayList
BitArray
Collection
Comparer
HashSet
Hashtable
LinkedList
List
ListDictionary
OrderedDictionary
Queue
SortedList
SortedSet
Stack
StringCollection
StringDictionary