//************************************** // Name: arraylist // Description:learn arraylist in c# // By: hatem mostafa ahmed // // // Inputs:None // // Returns:None // //Assumes:None // //Side Effects:None //************************************** using System; using System.Collections.Generic; public class Program { public static void Main() { List<int> numbers = new List<int>(); numbers.Add(5); numbers.Add(12); numbers.Add(4); numbers.Add(2); for(int i=0;i<numbers.Count;i++) Console.Write(numbers[i]+" "); numbers.Remove(4); Console.WriteLine(); for(int i=0;i<numbers.Count;i++) Console.Write(numbers[i]+" "); } }