static void Main(string[] args) { BasicCollection <Point> bc = new BasicCollection <Point>(); bc.FillList(new Point(1, 1), new Point(2, 2), new Point(3, 3)); foreach (var word in bc) { Console.WriteLine(word); if (word.X == 3) { bc.Delete(word); } } Console.ReadLine(); }
static void Main(string[] args) { BasicCollection <string> bc = new BasicCollection <string>(); bc.FillList("One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eigth", "Nine", "Ten"); foreach (string word in bc) { Console.WriteLine('\t' + word); } Console.ReadLine(); foreach (string word in bc.Reverse) { Console.WriteLine('\t' + word); } Console.ReadLine(); }