Exemple #1
0
        static void Main()
        {
            var d = new Diak {
                Kor = 30, Nev = "Zoli"
            };

            Console.WriteLine(d.SzulEv);
            Console.ReadKey();
        }
Exemple #2
0
        static void Tombbel()
        {
            var diakTomb = new Diak[5];

            for (int i = 0; i < diakTomb.Length; i++)
            {
                Console.WriteLine($"{i + 1}. diák neve: ");
                var nev = Console.ReadLine();

                Console.WriteLine($"{i + 1}. diák kor: ");
                var kor = int.Parse(Console.ReadLine());

                //diakTomb[i] = new Diak { Nev = nev, Kor = kor };
                diakTomb[i] = new Diak(nev, kor);
                //diakTomb[i] = new Diak(kor: 12, nev: "Józsi");
            }
        }