Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            GenericList<int> test = new GenericList<int>();
            Random randomNumber = new Random();
            for (int i = 0; i < 10; i++)
            {
                test.AddElement(randomNumber.Next(1, 100));
            }

            Console.WriteLine("The GenericList is:\n {0}",test);
            test.RemoveElementByIndex(0);
            Console.WriteLine("After removing element by index, the GenericList is:\n {0}",test);
            test.InsertElementByIndex(5, 89);
            Console.WriteLine("After insert new element, the GenericList is:\n {0}", test);
            test.FindElemByValue(89);
            Console.WriteLine("The maximal element is: {0}",test.Maximum());
            Console.WriteLine("The minimal element is: {0}", test.Minimum());
            test.CleanList();
            Console.WriteLine("After clearing the GenericList is: {0}",test);
        }