# What is index-based I/O ArrayList collection in C#?

CsharpProgrammingServer Side Programming

ArrayList class represents an ordered collection of an object that can be indexed individually. It is an alternative to an array.

The following table lists some of the commonly used properties of the ArrayList class −

Sr.NoProperty & Description
1Capacity
Gets or sets the number of elements that the ArrayList can contain.
2Count
Gets the number of elements actually contained in the ArrayList.
3IsFixedSize
Gets a value indicating whether the ArrayList has a fixed size.
Gets a value indicating whether the ArrayList is read-only.
5Item
Gets or sets the element at the specified index.

The following is an example showing how to work with ArrayList in C# and finding the capacity. The default capacity is 4.

## Example

using System;
using System.Collections;

namespace Demo {
class Program {
static void Main(string[] args) {
ArrayList x = new ArrayList();

}