|
|
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:
|
|
|
|
No Response found!
|
|
|
|
|