static void Main(string[] args) { MyDictionarys <string, int> kisiler = new MyDictionarys <string, int>(); kisiler.Add("zişan", 22); kisiler.Add("müşoo", 23); kisiler.Add("küpp", 22); for (int i = 0; i < kisiler.Item.Length; i++) { Console.WriteLine(kisiler.Item[i] + " - " + kisiler.Value[i]); } }
static void Main(string[] args) { MyDictionarys <int, string> isimler = new MyDictionarys <int, string>(); isimler.Add(1, "Taha"); isimler.Add(2, "Ali"); isimler.Add(3, "Hasan"); isimler.Add(4, "Yücel"); Console.WriteLine(isimler.Count); foreach (var isim in isimler.Values) { Console.WriteLine(isim); } Console.ReadLine(); }