static void Main(string[] args) { MyDictionary <int, string> myDictionary = new MyDictionary <int, string>(); myDictionary.Add(2212, "METEHAN YETKİN"); myDictionary.Add(3242, "MERT YETKİN"); myDictionary.Add(2212, "TUGBA ÖKSÜM"); myDictionary.Add(2322, "ALİ KILIC"); myDictionary.List(); }
static void Main(string[] args) { MyDictionary <int, string> plakalar = new MyDictionary <int, string>(); plakalar.Add(1, "Adana"); Console.WriteLine("Adana ili eklendi"); plakalar.Add(2, "Adıyaman"); Console.WriteLine("Adıyaman ili eklendi"); plakalar.List(); }
static void Main(string[] args) { Console.WriteLine("\n ~~~~ Welcome to our shop ~~~~\n"); MyDictionary <string, float> myDictionary = new MyDictionary <string, float>(); Console.WriteLine("Please enter the number of keys to add"); int numb = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("___________________________________________________\n"); for (int i = 1; i <= numb; i++) { Console.WriteLine("[" + i + "] Please enter the key first, then the value"); myDictionary.Add(Console.ReadLine(), float.Parse(Console.ReadLine())); } Console.WriteLine("\n___________________________________________________\n"); myDictionary.List(); }