static void Read(Early e) { Console.WriteLine("Kapott érték: " + e.TestFunction()); }
static void Main(string[] args) { PartialClass pc = new PartialClass(); pc.Kiir(); pc.Kiir2(); var customer3 = new Customer(8, "Sanyi"); var order = new Order(); Console.WriteLine(customer3.Id); Console.WriteLine(customer3.Name); Console.WriteLine("\n////////////////////////////////////////\n"); /* * Console.WriteLine("Add meg a neved:"); * var getName = Console.ReadLine(); * * Console.WriteLine("Add meg a korod:"); * var getAge = Convert.ToInt32(Console.ReadLine()); * * Console.WriteLine("Add meg a címed:"); * var getPostalCode = Convert.ToInt32(Console.ReadLine()); * * * Ember e = new Ember(getName, getAge, getPostalCode); * * e.Write(); */ Early e = new Early(); Late l = new Late(); Read(e); Read(l); var abs = new Oszt(); abs.osztas(); var bgy = new BaseGyakorlat.Animals(); var bgya = new BaseGyakorlat.Dog(""); var bgyb = new BaseGyakorlat.Crocodile(""); bgya.Name = "A kutyám"; bgyb.Name = "A krokodilom"; string[] Names = new string[] { "Zoli", "Feri", "Kata", "János", "Tibor", "Zsolti", "Lala", "Gabi" }; for (int i = 0; i < Names.Length; i++) { bgy.Name = Names[i]; bgy.Eat(); } var an = new VirtualMethods.Animal(); var dog = new VirtualMethods.Dog("Zoli"); var cro = new VirtualMethods.Crocodile("Rokko"); //an.Eat(); dog.Eat(); cro.Eat(); Console.WriteLine(); var asd = new Alosztaly(); // A példányosítást követően a konstruktorban lévő események lefutnak! var sdf = new KovetkezoAlosztlay(); var dfg = new UtolsoAlosztlay(); asd.Alapmuvelet(); sdf.Alapmuvelet(); dfg.Alapmuvelet(); Console.WriteLine("\n////////////////////////////////////////\n"); /* * VirtualMethods.Animal d = new VirtualMethods.Dog("Zoli-kutya"); * dog.Eat(); */ Dog d = new Dog(); d.Eat(); var Iface = new Pelda(); EgeszSzam esz1 = new EgeszSzam(20); EgeszSzam esz2 = new EgeszSzam(13); EgeszSzam ossz = esz1 + esz2; Console.WriteLine(ossz.Szam); MyInt x = new MyInt(10); MyInt y = new MyInt(20); MyInt result = x + y; Console.WriteLine(result.value); // 30 Console.ReadKey(); }