Пример #1
0
        static void Main(string[] args)
        {
            MyDictionary <int, string> myDictionary = new MyDictionary <int, string>();

            HandleException(() =>
            {
                myDictionary.Add(5, "selam");
                myDictionary.Add(1, "merhaba");
                myDictionary.Add(8, "hello");
                //Hata durumu
                myDictionary.Add(1, "hi");
            });


            foreach (var value in myDictionary.Values)
            {
                Console.WriteLine(value);
            }

            Console.WriteLine(myDictionary.Count);

            Console.WriteLine(myDictionary.GetValueByKey(8));
        }