Example #1
0
        static void Main(string[] args)
        {
            //var str = "Hello world";
            //Console.WriteLine(string.Concat(str.Reverse()));
            //str.ToList().ForEach(x => Console.WriteLine(x));

            var arrayL = new List <IPerson>();

            for (int i = 0; i < 10; i++)
            {
                arrayL.Add(new Person());
            }

            IBaseCollectionUsing GenericList = new GenericListUsing();
            IBaseCollectionUsing Dictionary  = new DictionaryUsing();

            BaseUsingTest.Execute(ref Dictionary);
            //BaseExamples();
            //Lesson();
            // Additional();
            #region Homework
            IBaseCollectionUsing collectionUsing = new ArrayListUsing();
            BaseUsingTest.Execute(ref collectionUsing);
            #endregion

            List <string> a1 = new List <string>();
            new Dictionary <object, object>();
        }
Example #2
0
        static void Main(string[] args)
        {
            //var str = "Hello world";
            //Console.WriteLine(string.Concat(str.Reverse()));
            //str.ToList().ForEach(x => Console.WriteLine(x));

            var arrayL = new List <IPerson>();

            for (int i = 0; i < 10; i++)
            {
                arrayL.Add(new Person());
            }

            //BaseExamples();
            //Lesson();
            // Additional();
            #region Homework

            ToConsole("***ArrayListUsing***", ConsoleColor.White);
            ToConsole();

            IBaseCollectionUsing collectionUsing = new ArrayListUsing();
            BaseUsingTest.Execute(ref collectionUsing);

            ToConsole();
            ToConsole("***GenericListUsing***", ConsoleColor.White);
            ToConsole();

            collectionUsing = new GenericListUsing();
            BaseUsingTest.Execute(ref collectionUsing);


            ToConsole();
            ToConsole("***DictionaryUsing***", ConsoleColor.White);
            ToConsole();

            collectionUsing = new DictionaryUsing();
            BaseUsingTest.Execute(ref collectionUsing);

            #endregion
        }