Home > Definition > .NET > What is ArrayList?

What is ArrayList?

by Narain_Siddharth   on Dec 14, 2011   Category: .NET   |  Views: 74    |  Points: 25   |  Silver 



The arraylist is an array and having collection of items. The ADD method in the Arraylist class is used to add the new object to the end of the ArrayList and it can be dynamically grow and shrink also we can add different data type of objects in the Arraylist. Arryalist is untyped one.

The below sample C# code to create an Array List, and retrieve the items in the ArrayList

   
using System.Collections;

ArrayList ListTest = new ArrayList();
int i;
for (i = 0; i < 5; i++)
{
ListTest.Add(i);
}
for (i = 0; i < ListTest.Count ; i++)
{
Response.Write(ListTest.ToString());
}



Like this definition? Bookmark and Share:

  User Responses | Post Definition
 No Response found!
  Recent Posts
* what is bubbled event in .NET? (483) by Shiva on May 4 2011 1:09AM
* What is a satellite assembly in .NET? (597) by Shiva on May 4 2011 12:22PM
* What is viewstate in ASP.NET? (1000) by Narain_Siddharth on May 8 2011 4:27AM
* What does SOAP stands for? (364) by Spidy on May 17 2011 5:30AM
* What does WSDL stands for? (350) by Spidy on May 17 2011 5:31AM
  Submit feedback about this definition
Please sign in to post feedback