Пример #1
0
        public static void Main()
        {
            Fulltime f = new Fulltime("liki", "gow", 50000);

            f.printsalary();
            //type casting to print hidden method
            ((employee)f).printname();
        }
Пример #2
0
        public static void Main()
        {
            employee[] em = new employee[3];
            em[0] = new employee("likith", "gowda");
            em[1] = new Fulltime("jay", "anth", "softwareEngineer");
            em[2] = new Parttime("abhi", "shek", "manager");

            foreach (employee e in em)
            {
                e.printname();
            }
        }
        public static void Main()
        {
            Fulltime f = new Fulltime("liki", "gow", 50000);

            f.printsalary();
        }