private void Form1_Load(object sender, EventArgs e)
{
ArrayList arrayList = new ArrayList();
arrayList.Add(“Customer1”);
arrayList.Add(“Customer2”);
arrayList.Add(“Customer3”);
arrayList.Add(“Customer4”);
arrayList.Add(“Customer5”);
MessageBox.Show(arrayList.IndexOf(“Customer1”).ToString());
}
The above statement returns zero because “Customer1” is the first item in the ArrayList.
Copyright © 2012 - All Rights Reserved - VKInfotek.com