private static void ClassIntro() { //Class nedir ne için kullanılır? //Yapmak istediğimiz işlemleri gruplara ayırmak. Bu grup üzerinden işlemlerimizi yapmak. //Ve rahatlıkla bu gruba ulaşmak için kullanabiliriz en temel olarak. //Classın örneği camelCase CustomerManager customerManager = new CustomerManager(); //Aşağıdaki classın örneğini oluşturduk. Referansını da oluşturduk diyebiliriz. customerManager.Add(); customerManager.Update(); //ProductManager classının aynı dosyada bulunmasına gerek yok. ProductManager productManager = new ProductManager(); productManager.Add(); productManager.Update(); }
static void Main(string[] args) { CustomerManager customerManager = new CustomerManager(); customerManager.Add(); customerManager.Read(); customerManager.Update(); customerManager.Delete(); Console.ReadLine(); ProductManager productManager = new ProductManager(); productManager.Add(); productManager.Read(); productManager.Update(); productManager.Delete(); Console.ReadLine(); Customer customer = new Customer(); customer.Id = 1; customer.FirstName = "Cem"; customer.LastName = "Kırmızı"; customer.City = "Argentina"; //other Customer customer2 = new Customer() { Id = 2, FirstName = "Yılmaz", LastName = "Turuncu", City = "Cuba" }; Console.WriteLine(customer.City); Console.WriteLine(customer2.City); Console.ReadLine(); }
static void Main(string[] args) { CustomerManager customerManager = new CustomerManager(); customerManager.Add(); customerManager.Update(); ProductManager productManager = new ProductManager(); productManager.Add(); productManager.Update(); Customer customer1 = new Customer(); customer1.Id = 1; customer1.FirstName = "Müyesser"; customer1.LastName = "Cançelik"; customer1.City = "İstanbul"; Customer customer2 = new Customer(); customer2.Id = 2; customer2.FirstName = "Engin"; customer2.LastName = "Demiroğ"; customer2.City = "Ankara"; Customer customer3 = new Customer() { Id = 3, FirstName = "Ahmet", LastName = "Cançelik", City = "İstanbul" }; Customer customer4 = new Customer() { Id = 4, FirstName = "Emine", LastName = "Can", City = "Kilis" }; Console.WriteLine(customer1.FirstName); Console.WriteLine(); }
static void Main(string[] args) { Customer customer = new Customer(); customer.City = "Ankara"; customer.Name = "Yagmur"; customer.Id = 1; Customer customer2 = new Customer { Id = 2, City = "Antalya", Name = "Unsal" }; Console.WriteLine("Ilk musteri : " + customer.Name + "\nBulundugu Sehir : " + customer.City); CustomerManager manager = new CustomerManager(); manager.Add(); Console.WriteLine("Ikinci musteri : " + customer2.Name + "\nBulundugu Sehir : " + customer2.City); manager.Delete(); }
//class CustomerManager //{ // public void Add() // { // Console.WriteLine("Customer Added!!"); // } // public void Update() // { // Console.WriteLine("Customer Updated!!"); // } //} static void Main(string[] args) { CustomerManager customerManager = new CustomerManager(); customerManager.Add(); customerManager.Update(); Customer customer = new Customer(); customer.City = "Antalya"; customer.Id = 1; customer.FirstName = "Seçkin"; customer.LastName = "Bakır"; //Customer customer1 = new Customer(); //{ // Id = 2 , City = "Antalya" , FirstName = "Yagmur" , LastName = "Ulağ" //}; //string name = customer1.FirstName; //Console.WriteLine(name); }
static void Main(string[] args) { CustomerManager customerManager = new CustomerManager(); customerManager.Add(); customerManager.Update(); ProductrManager productrManager = new ProductrManager(); productrManager.Add(); productrManager.Update(); Customer customer = new Customer(); customer.Id = 1; customer.FirstName = "Ezgi"; customer.LastName = "Akar"; customer.City = "Kocaeli"; Console.WriteLine(customer.FirstName); Console.ReadLine(); }
static void Main(string[] args) { CustomerManager customerManager = new CustomerManager(); customerManager.Add(); customerManager.Update(); ProductManager productManager = new ProductManager(); productManager.Add(); productManager.Update(); Customer customer = new Customer(); customer.City = "Ankara"; customer.Id = 1; customer.FirstName = "Halit"; customer.LastName = "Kaplan"; //Classları bu şekilde de kullanabiliriz. //******************************************** //Classları bu şekilde de kullanabiliriz. Customer customer1 = new Customer { Id = 2, City = "İstanbul", FirstName = "Halit", LastName = "Kaplan" }; Console.ReadLine(); }
static void Main(string[] args) { CustomerManager customerManager = new CustomerManager(); customerManager.Add(); customerManager.Update(); Customer customer = new Customer(); customer.Id = 1; customer.FirstName = "Rıfat"; customer.LastName = "Orhan"; customer.City = "İstanbul"; Customer customer2 = new Customer { Id = 2, City = "İstanbul", FirstName = "Rıfat", LastName = "Orhan" }; Console.WriteLine(customer2.LastName); Console.ReadLine(); }
static void Main(string[] args) { CustomerManager customerManager = new CustomerManager(); customerManager.Add(); customerManager.Update(); ProductManager productManager = new ProductManager(); productManager.Add(); productManager.Update(); Customer customer = new Customer(); customer.city = "Eses"; customer.FirstName = "Emre"; customer.Id = 1; customer.LastName = "Gndgd"; Customer customer1 = new Customer { Id = 2, city = "Muğla" , FirstName = "Yaren",LastName = "abc123" }; Console.WriteLine(customer1.FirstName); }
static void Main(string[] args) { CustomerManager customerManager = new CustomerManager(); customerManager.Add(); customerManager.Update(); ProductManager productManager = new ProductManager(); productManager.Add(); productManager.Update(); Customer customer = new Customer(); customer.Id = 1; customer.City = "Edirne"; customer.FirstName = "Utku"; customer.LastName = "Mutlu"; Customer customer1 = new Customer() { Id = 1, FirstName = "Utku", LastName = "mutlu", City = "Edirne" }; }
static void Main(string[] args) {//37.Ders CustomerManager customerManager = new CustomerManager(); customerManager.Add(); customerManager.Update(); Console.WriteLine("-----------------------------------"); ProductManager productManager = new ProductManager(); productManager.Add(); productManager.Update(); Console.WriteLine("-----------------------------------"); //38.Ders Customer customer = new Customer(); customer.Id = 1; customer.FName = "Engin"; customer.LName = "Demiroğ"; customer.City = "Ankara"; Console.WriteLine("-----------------------------------"); Customer customer2 = new Customer { Id = 2, FName = "Derin", LName = "Demiroğ", City = "Anakara", }; Console.WriteLine(customer2.FName); Console.WriteLine("-----------------------------------"); Console.ReadLine(); }
static void Main(string[] args) { CustomerManager customerManager = new CustomerManager(); customerManager.Add(); ProductManager productManager = new ProductManager(); productManager.Add(); productManager.Update(); //1.way Customer customer = new Customer(); customer.City = "Istanbul"; customer.FirstName = "Serhat"; customer.LastName = "Ardic"; customer.Id = 1; //2. way Customer customer2 = new Customer() { City = "Karaman", Id = 2, FirstName = "Eymen", LastName = "Ardic" }; Console.WriteLine(customer2.FirstName + customer2.LastName); }