コード例 #1
0
ファイル: Program.cs プロジェクト: gokcenaysu/CSharpCamp
        static void Main(string[] args)
        {
            Customer customer1 = new Customer();

            customer1.Id         = 1;
            customer1.FirstName  = "Aysu";
            customer1.LastName   = "Gökcen";
            customer1.CreditCard = "1234-4567-9876-5432";

            Customer customer2 = new Customer();

            customer2.Id         = 2;
            customer2.FirstName  = "Engin";
            customer2.LastName   = "Demiroğ";
            customer2.CreditCard = "9876-5432-1234-5678";

            /*  Customer[] customers = { customer1, customer2 };
             * foreach (Customer customer in customers)
             * {
             *    Console.WriteLine(customer.FirstName + " " + customer.LastName);
             *    Console.WriteLine(customer.CreditCard);
             * }*/

            CustomerManager customerManager = new CustomerManager();

            customerManager.addCustomer(customer1);
            customerManager.addCard(customer1);
            customerManager.deleteCustomer(customer2);
            customerManager.deleteCard(customer2);
        }