The ArrayList object is a collection of items containing a single data value.
Items are added to the ArrayList with the Add() method.
The following code creates a new ArrayList object named books and three items are added:
Items are added to the ArrayList with the Add() method.
The following code creates a new ArrayList object named books and three items are added:
ArrayList books = new ArrayList();
books.Add(”book1");
books.Add(”book2");
books.Add(”book3");
books.Add(”book1");
books.Add(”book2");
books.Add(”book3");