Пример #1
0
        static void Main(string[] args)
        {
            if (args == null) throw new ArgumentNullException(nameof(args));
            var myList = new MyList();

            //myList.AddToEnd(5);
            //myList.AddToEnd(2);
            //myList.AddToEnd(8);
            //myList.AddToEnd(7);
            //myList.AddToEnd(11);

            //myList.AddToBeginning(5);
            //myList.AddToBeginning(2);
            //myList.AddToBeginning(8);
            //myList.AddToBeginning(7);
            //myList.AddToBeginning(11);

            myList.AddSorted(5);
            myList.AddSorted(2);
            myList.AddSorted(8);
            myList.AddSorted(7);
            myList.AddSorted(11);

            myList.Print();

            myList.Find(7);
            myList.Min();
            myList.Max();

            myList.Delete(7);
            myList.Print();

            Console.ReadLine();
        }