Beispiel #1
0
        public static void Main()
        {
            FullTimeEmployee FTE = new FullTimeEmployee();

            FTE.firstName = "Georgi";
            FTE.lastName  = "Ivanov";
            FTE.PrintFullName();

            PartTimeEmployee PTE = new PartTimeEmployee();

            PTE.firstName = "Ivan";
            PTE.lastName  = "Georgiev";
            PTE.PrintFullName();
        }
        static void Main(string[] args)
        {
            FullTimeEmployee fte = new FullTimeEmployee();

            fte.FirstName = "FullTime";
            fte.LastName  = "Employee";
            fte.PrintFullName();

            PartTimeEmployee pte = new PartTimeEmployee();

            //Employee pte = new PartTimeEmployee(); //calls base class method
            pte.FirstName = "PartTime";
            pte.LastName  = "Employee";
            pte.PrintFullName();
            //((Employee)pte).PrintFullName();Way to call base class method

            Console.ReadKey();
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            FullTimeEmployee FTE = new FullTimeEmployee();

            FTE.FirstName = "FullTime";
            FTE.LastName  = "Employee";
            FTE.Email     = "*****@*****.**";
            FTE.PrintFullName();

            Employee PTE = new PartTimeEmployee();

            //PartTimeEmployee PTE = new PartTimeEmployee();
            PTE.FirstName = "PartTime";
            PTE.LastName  = "Employee";
            PTE.Email     = "*****@*****.**";
            //((Employee)PTE).PrintFullName();
            PTE.PrintFullName();

            Console.Read();
        }