static void Main(string[] args) { MyDict <int, string> malzemeler = new MyDict <int, string>(); malzemeler.Add(1, "Kalem"); malzemeler.Add(2, "Kitap"); malzemeler.Add(2, " Suluk"); malzemeler.Add(3, "Çanta"); }
static void Main(string[] args) { MyDict <int, string> favouriteCarsAndMotors = new MyDict <int, string>(); favouriteCarsAndMotors.Add(1, "Yamaha YZR125"); favouriteCarsAndMotors.Add(2, "Dodge Dart GT"); favouriteCarsAndMotors.Add(3, "Chevrolet Camaro S"); favouriteCarsAndMotors.Add(4, "Tesla Model Y"); favouriteCarsAndMotors.Add(5, "Kawasaki Ninja"); }
static void Main(string[] args) { MyDict <int, string> myDict = new MyDict <int, string>(); myDict.Add(1, "Ahmet"); myDict.Add(2, "Mehmet"); myDict.Add(3, "Barış"); myDict.View(); }
private static void Main(string[] args) { MyDict <int, string> myDict = new MyDict <int, string>(); myDict.Add(1, "Çağkan"); myDict.Add(2, "Mert"); myDict.Add(3, "Öztaş"); Console.WriteLine($"Key 1'e karşılık gelen değer: {myDict.GetValue(1)}"); Console.WriteLine($"myDict boyutu: {myDict.Count}"); }
static void Main(string[] args) { MyDict<int, string> kitaplar = new MyDict<int, string>(); kitaplar.Add(1, "Roman"); kitaplar.Add(2, "Bilim-Kurgu"); kitaplar.Add(3, "Şiir"); kitaplar.Add(4, "Anı"); kitaplar.Add(5, "Öykü"); }
static void Main(string[] args) { MyDict <int, string> sozluk = new MyDict <int, string>(); sozluk.Add(1, "bir"); sozluk.Add(2, "iki"); sozluk.Add(3, "üç"); Console.WriteLine("Hello World!"); }
static void Main(string[] args) { MyDict <string, string> myDict = new MyDict <string, string>(); myDict.Add("1234", "Burak"); myDict.GetAll(); Console.WriteLine("Burada bitiyor ilk dict"); myDict.Add("5678", "Murat"); myDict.GetAll(); }
static void Main(string[] args) { Dictionary <int, string> dictionary1 = new Dictionary <int, string>(); dictionary1.Add(02, "Adıyaman"); dictionary1.Add(34, "İstanbul"); Console.WriteLine("Dictionary"); Console.WriteLine(dictionary1.Count); MyDict <int, string> dictionary2 = new MyDict <int, string> { }; dictionary2.Add(01, "Adana"); dictionary2.Add(35, "İzmir"); Console.WriteLine("MyDictionary"); Console.WriteLine(dictionary2.Count); }
static void Main(string[] args) { //Yapıyı anlamak için yazılan satır... Dictionary <int, string> sozluk = new Dictionary <int, string>(); sozluk.Add(58, "Sivas"); MyDict <int, string> plakalar = new MyDict <int, string>(); plakalar.Add(77, "Yalova"); plakalar.Add(35, "İzmir"); plakalar.Add(45, "Manisa"); plakalar.Add(06, "Ankara"); plakalar.Add(09, "Aydın"); plakalar.Add(58, "Sivas"); foreach (var plakano in plakalar.Keys) { Console.WriteLine(plakano); } foreach (var sehir in plakalar.Values) { Console.WriteLine(sehir); } }
static void Main(string[] args) { MyDict <string> name = new MyDict <string>(); name.Add("Zc"); }