1.
using System; using System.Collections; using System.Collections.Generic; class Program { static void Main(string[] args) { var al = new ArrayList { 2, 3, true, "aa", true }; //al.Clear(); var count = al.Count; for (int i = 0; i < count; i++) { al.RemoveAt(0); } Console.WriteLine(al.Count); } }
using System; using System.Collections; using System.Collections.Generic; class Program { static void Main(string[] args) { var al = new ArrayList {"aa", "ab"}; al.Remove(new string(new char[] {'a', 'b'})); foreach (var o in al) { Console.WriteLine(o); } } }