ArrayList alcollect = new ArrayList(); // Add individual items to the collection string str = "learn csharp"; alcollect.Add(str); //check existence of object if(alcollect.Contains(str)) { Console.WriteLine(alcollect.IndexOf(str)); } else { Console.WriteLine("Not found!"); } //csharp/7612