What is Array List in .Net

 Posted by deccansoft on 9/27/2010 | Category: C# Interview questions | Views: 1444


Array list is a type which similar to an Array. We will specify the size for
the Array which will never going to change in its life time. But In
Array List, the size gets dynamically increases when needed.

Example:

Using System.Collections;

Public static void main(String[] args)

{

ArrayList arrList = new ArrayList();

arrList.Add(11);

arrList.Add(12);

arrList.Add(13);

arrList.Add(14);

foreach(int num in arrList)

{

Console.WriteLine(num);

}

}


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response