static void Main(string[] args)
        {
            ExDeviderV2.AdditionalEx();

            foreach (string el in Try())
            {
                Console.WriteLine(el);
            }

            ExDeviderV2.Ex2();//------------------------------------------------------------------------------------

            Ex2Program.ShowEx();

            ExDeviderV2.Ex3();//------------------------------------------------------------------------------------

            Ex3Program.ShowEx3();

            ExDeviderV2.Ex4();//------------------------------------------------------------------------------------

            MyList <int> list = new MyList <int>();

            for (int i = 0; i < 11; i++)
            {
                list.Add(i);
            }

            int[] arr = list.GetArray();

            foreach (int t in arr)
            {
                Console.Write("{0}  ", t);
            }
        }
Esempio n. 2
0
        public static void ShowEx3()
        {
            var dictionary = new MyDictionary <string, string>
            {
                { "стол", "table" },
                { "яблоко", "apple" },
                { "карандаш", "pencil" },
                { "солнце", "sun" },
                { "блокнот", "notepad" }
            };

            foreach (var item in dictionary)
            {
                Console.WriteLine(item);
            }

            ExDeviderV2.Line();
            Console.WriteLine("Вторая запись в словаре:");
            Console.WriteLine(dictionary[1]);
            ExDeviderV2.Line();
            Console.WriteLine("Размер словаря:");
            Console.WriteLine(dictionary.Lenght + " слов");
            ExDeviderV2.Line();
        }