Clear an ArrayList : ArrayList : Data Structure C# Examples


C# Examples » Data Structure » ArrayList »

 

Clear an ArrayList









    
using  System;
using  System.Collections;

class  MainClass
{
    static  void  Main(string[]  args)
    {
        ArrayList  a  =  new  ArrayList(10);
        int  x  =  0;

        a.Add(  ++x);
        a.Add(  ++x);
        a.Add(  ++x);
        a.Add(  ++x);

        a.Remove(x);
        
        a.RemoveAt(0);
        a.Clear();
    }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Data Structure
» ArrayList