static void Main(string[] args) { MyDictionary <int, string> myDictionary = new MyDictionary <int, string>(); myDictionary.Add(1699, "Zafer"); myDictionary.Add(1696, "Abdullah"); myDictionary.Add(1700, "Bora"); myDictionary.Add(1703, "Efecan"); myDictionary.Key(1699); myDictionary.Key(1710); myDictionary.Key(1696); Console.ReadLine(); }
static void Main(string[] args) { MyDictionary <int, string> dictionary = new MyDictionary <int, string>(); dictionary.Add(1, "Recep"); dictionary.Add(2, "Ahmet"); dictionary.Add(3, "Doğukan"); Console.WriteLine(dictionary.Count); for (int i = 0; i < dictionary.Count; i++) { Console.WriteLine(dictionary.Key(i) + " : " + dictionary.Value(i)); } dictionary.Add(3, "Hasan"); for (int i = 0; i < dictionary.Count; i++) { Console.WriteLine(dictionary.Key(i) + " : " + dictionary.Value(i)); } }