Esempio n. 1
0
        static void Main(string[] args)
        {
            Employee employee = new Employee();

            employee.Nimi    = "Keijo";
            employee.Ammatti = "Ruohonleikkaaja";
            employee.Palkka  = 5000;
            Console.WriteLine(employee.ToString());

            boss pomo = new boss();

            pomo.Nimi    = "Esa";
            pomo.Ammatti = "Varastopomo";
            pomo.Palkka  = 3000;
            pomo.Auto    = "Bemmi";
            pomo.Bonus   = 40;
            Console.WriteLine(pomo.ToString());

            boss pomo2 = new boss("Antti", "Ammattilainen", 400, "audi", 40);
        }
Esempio n. 2
0
        private static void Main(string[] args)
        {
            Employee employee = new Employee
            {
                Name       = "Kirsi Kernel",
                Profession = "Teacher",
                Salary     = 2000
            };

            Console.WriteLine(employee.ToString());

            Boss boss = new Boss
            {
                Name       = "Kalle Koivisto",
                Profession = "Boss",
                Salary     = 5000,
                Car        = "Ferrari",
                Bonus      = 2500
            };

            Console.WriteLine(boss.ToString());
        }