Esempio n. 1
0
        public static void DoSomething()
        {
            Employee   employee = new Employee("Cool Guy", 65);
            IPromotion p        = employee;

            Console.WriteLine(employee);
            p.Promote();
            Console.WriteLine(employee);
        }
Esempio n. 2
0
        static void Main()
        {
            Employee employee = new Employee("Pesho", 1000);

            Console.WriteLine(employee);
            IPromotion newemployee = employee;

            newemployee.Promote();
            Console.WriteLine(newemployee);
            Console.WriteLine(employee);
        }