예제 #1
0
        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");
        }
예제 #2
0
        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");
        }
예제 #3
0
        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();
        }
예제 #4
0
        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}");
        }
예제 #5
0
        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ü");


}
예제 #6
0
파일: Program.cs 프로젝트: M-K-E-C/CSharp
        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!");
        }
예제 #7
0
        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();
        }
예제 #8
0
        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);
        }
예제 #9
0
        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);
            }
        }
예제 #10
0
        static void Main(string[] args)
        {
            MyDict <string> name = new MyDict <string>();

            name.Add("Zc");
        }