C# ArrayList ToString
Description
ArrayList ToString
returns a string that represents
the current object.
Syntax
ArrayList.ToString
has the following syntax.
public virtual string ToString()
Returns
ArrayList.ToString
method returns A string that represents the current object.
Example
using System;//from w ww.j av a 2 s . com
using System.Collections;
using System.Collections.Generic;
using System.Linq;
class MainClass
{
public static void Main()
{
ArrayList arraylist = new ArrayList(4);
arraylist.Add("M");
arraylist.Add("K");
arraylist.Add("A");
arraylist.Add("A");
Console.WriteLine(arraylist.ToString());
}
}
The code above generates the following result.