using System; public class Employee { public string FristName; public string LastName; public string Email; public void FullName() { Console.WriteLine(FristName+ " " + LastName+" "+Email); } public class EmployeeMounthSalary : Employee { public float MounthSalary; } public class EmployeeHourlySalary : Employee { public float HourlySalary; } public class Program { public static void Main() { EmployeeMounthSalary EMS = new EmployeeMounthSalary(); EMS.FristName = "Raja"; EMS.LastName = "Thananki"; EMS.Email = "traja003@gmail.com"; EMS.MounthSalary = 1000; EMS.FullName(); EmployeeHourlySalary EHS = new EmployeeHourlySalary(); EHS.FristName = "Raja"; EHS.LastName = "Thananki"; EHS.Email = "traja003@gmail.com"; EHS.HourlySalary= 1000; EHS.FullName(); Console.ReadLine(); } } }
Console.WriteLine(EHS.MounthSalary); Console.WriteLine(EHS.HourlySalary);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)