Ejemplo n.º 1
0
        static void   Main(string[] args)
        {
            Mylist <string> isimler = new Mylist <string>();

            isimler.Add("Engin");

            Console.WriteLine(isimler.Length);
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Mylist<string> isimler = new Mylist<string>();
            isimler.Add("Engin");
           

            Console.WriteLine("Hello World!");

        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            Mylist <string> yeniListem = new Mylist <string>();

            yeniListem.Add("ankara");
            yeniListem.Add("istanbul");
            yeniListem.Add("izmir");
            yeniListem.Add("ankara");
            yeniListem.Add("ankara");
            yeniListem.Add("ilk isim");
            Console.WriteLine(yeniListem.Count);
        }
Ejemplo n.º 4
0
        static void Main(string[] args)
        {
            Mylist <string> isimler = new Mylist <string>();

            isimler.Add("İlknur");

            Console.WriteLine(isimler.Length);

            foreach (var isim in isimler)
            {
                Console.WriteLine(isim);
            }
        }
Ejemplo n.º 5
0
        static void Main(string[] args)
        {
            Mylist <string> liste1 = new Mylist <string>();

            liste1.Add("Sefa");

            Console.WriteLine(liste1.length);
            liste1.Add("Merve");

            Console.WriteLine(liste1.length);
            liste1.Add("Şuayip");

            Console.WriteLine(liste1.length);
        }
Ejemplo n.º 6
0
        static void Main(string[] args)
        {
            //hazır collection hazır liste
            List <string> liste = new List <string>(); //new lemek bir referans oluştur.Adres ver bana

            Console.WriteLine(liste.Count);            //çıktısı sıfır elemanlı. arka planda bir array yönetiyor
            liste.Add("Ahmet");                        //
            liste.Add("Salih");                        //iki tane eleman ekledik
            foreach (var item in liste)
            {
                Console.WriteLine(item);
            }
            Console.WriteLine(liste.Count); //iki yazdı

            Console.WriteLine("-------------------------");

            //burda MyList ile kendimiz collection oluşturduk
            Mylist <string> isimler = new Mylist <string>();

            Console.WriteLine(isimler.Length);
            isimler.Add("İbrahim");
            isimler.Add("Efe");
            foreach (var item in isimler.Items)
            {
                Console.WriteLine(item);
            }
            Console.WriteLine(isimler.Length);

            Console.WriteLine("------------------------------------");

            Dictionary <int, string> dictionary = new Dictionary <int, string>();

            dictionary.Add(25, "İbrahim");
            dictionary.Add(30, "Efe");
            foreach (var item in dictionary)
            {
                Console.WriteLine(item);
            }
            Console.WriteLine(dictionary.Count);

            MyDictionary <int, string> myDictionary = new MyDictionary <int, string>();

            myDictionary.Add(25, "Ali");
            myDictionary.Add(20, "Veli");
            foreach (var item in myDictionary.Keys)
            {
                Console.WriteLine(item);
            }
            Console.WriteLine(myDictionary.Length);
        }
Ejemplo n.º 7
0
        static void Main(string[] args)
        {
            Mylist <string> isimler = new Mylist <string>();

            isimler.Add("Engin");
            Console.WriteLine("Liste Uzunlugu :" + isimler.Length);

            isimler.Add("Kerem");
            Console.WriteLine("Liste Uzunlugu: " + isimler.Length);

            foreach (var isim in isimler.Items)  // isimler dizisindeki tanimli eleman sayisi "isimler.items"dir
            {
                Console.WriteLine(isim);
            }
        }
Ejemplo n.º 8
0
        static void Main(string[] args)
        {
            Mylist <string> isimler = new Mylist <string>();

            isimler.Add("Engin");

            Console.WriteLine(isimler.Length);

            isimler.Add("Kerem");

            Console.WriteLine(isimler.Length);

            foreach (var item in isimler.Items)
            {
                Console.WriteLine(item);
            }
        }
Ejemplo n.º 9
0
        static void Main(string[] args)
        {
            Mylist <string> isimler = new Mylist <string>();

            isimler.Add("Engin");
        }
Ejemplo n.º 10
0
        static void Main(string[] args)
        {
            Mylist <string> isimler = new Mylist <string>();

            isimler.Add("Canberk");
        }