using System.Collections;
using System.Collections.Generic;
public static void Main()
ArrayList myList = new ArrayList();
Console.WriteLine("Enter 1-5 for operation");
Console.WriteLine("[1] ADD");
Console.WriteLine("[2] UPDATE");
Console.WriteLine("[3] DELETE");
Console.WriteLine("[4] SEARCH");
Console.WriteLine("[5] DISPLAY ALL");
Console.WriteLine("This is the list of items inside the array");
foreach(string i in myList)
Console.WriteLine("Enter Operation");
enter = Console.ReadLine();
Console.WriteLine("Enter item you want to add");
myAdd = Console.ReadLine().ToLower();
if (myList.Contains(myAdd.ToLower())){
Console.WriteLine("Item already exists in array");
Console.WriteLine("Item Successfully added" );
Console.WriteLine("Enter index you want to update");
int myIndex = Convert.ToInt32(Console.ReadLine());
myList.RemoveAt(myIndex);
Console.WriteLine("Enter the item that will replace");
string myReplace = Console.ReadLine().ToLower();
if (myList.Contains(myReplace.ToLower()))
Console.WriteLine("Item already exists in array");
myList.Insert(myIndex, myReplace);
Console.WriteLine("Item Successfully added" );
Console.WriteLine("Enter item you want to delete");
String myDelete = Console.ReadLine().ToLower();
if (myList.Contains(myDelete)){
Console.WriteLine("Delete Successful");
Console.WriteLine("Item does not exist in array");
Console.WriteLine("Enter item you want to search");
String mySearch = Console.ReadLine().ToLower();
if (myList.Contains(mySearch)){
Console.WriteLine(mySearch + " is present at array");
Console.WriteLine(myList.IndexOf(mySearch));
Console.WriteLine("Not present in array");
foreach (string i in myList){