Check if the ArrayList has a fixed size in CSharp

Description

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

Example


//from   w  w  w .j a  v  a  2s .  c  om
using System; 
using System.Collections; 
 
class MainClass { 
  public static void Main() { 
    ArrayList al = new ArrayList(); 
     
    al.Add('C'); 
    al.Add('A'); 
    al.Add('E'); 
    al.Add('B'); 
    al.Add('D'); 
    al.Add('F'); 
 
    Console.WriteLine(al.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