コード例 #1
0
        static void Main(string[] args)
        {
            Musteri musteri1 = new Musteri();

            musteri1.Id     = 0338297;
            musteri1.Adi    = "Elif";
            musteri1.Soyadi = "Mandal";

            Musteri musteri2 = new Musteri();

            musteri2.Id     = 7236846;
            musteri2.Adi    = "Zeynep";
            musteri2.Soyadi = "Tatlı";

            MusteriManager musterimanager = new MusteriManager();

            Musteri[] Musteriler = new Musteri[] { musteri1, musteri2 };

            foreach (Musteri Musteri in Musteriler)
            {
                musterimanager.List(Musteri);
            }

            musterimanager.Add(musteri2);
            musterimanager.Delete(musteri1);
        }
コード例 #2
0
        static void Main(string[] args)
        {
            Musteri musteri1 = new Musteri();

            musteri1.Adi    = "Mert";
            musteri1.Soyadi = "Akın";
            musteri1.Id     = 6;
            musteri1.Yas    = 19;

            Musteri musteri2 = new Musteri();

            musteri2.Adi    = "Don";
            musteri2.Soyadi = "Carleone";
            musteri2.Id     = 1;
            musteri2.Yas    = 35;

            Musteri musteri3 = new Musteri();

            musteri3.Adi    = "Vito";
            musteri3.Soyadi = "Scaletta";
            musteri3.Id     = 2;
            musteri3.Yas    = 25;

            MusteriManager musteriManager = new MusteriManager();

            musteriManager.Add(musteri1);
            musteriManager.Add(musteri2);
            musteriManager.Add(musteri3);
            Console.WriteLine("--------------------------------");
            musteriManager.Delete(musteri1);
            musteriManager.Delete(musteri2);
            musteriManager.Delete(musteri3);
            Console.WriteLine("--------------------------------");

            Musteri[] musteriler = new Musteri[] { musteri1, musteri2, musteri3 };
            foreach (Musteri musteri in musteriler)
            {
                Console.WriteLine(musteri.Adi + " " + musteri.Soyadi);
            }
            Console.WriteLine("------------Müşteriler listelendi.------------------");
        }