Example #1
0
        /// <summary>
        /// The entry point of the program
        /// </summary>
        /// <param name="args"></param>
        public static void Main(string[] args)
        {
            UniqueList list = new UniqueList();
            try
            {
                list.Add(0, 1);
                list.Add(1, 1);
            }
            catch (EqualElementsException e)
            {
                Console.WriteLine(e);
            }
            try
            {
                list.Remove(2);
            }
            catch (NonexistentElementException e)
            {
                Console.WriteLine(e);
            }

            int counter = list.GetSize();
            Console.WriteLine("List: ");

            for (int i = 0; i < counter; ++i)
            {
                Console.Write(" " + list.Get(i));
            }
            Console.WriteLine();
        }