static void Main(string[] args) { String CSV = "Emplyee4,Employee2,500 Employee3,Employee1,800 Employee1,,1000 Employee5,Employee1,500 Employee2,Employee1,500"; Employee employee = new Employee(CSV); Console.WriteLine("Salary Valid:" + employee.validateSalary()); Console.WriteLine("Employess Valid: " + employee.ValidateEmployee()); Console.WriteLine("No Circular: " + employee.ValidateNoCicularRef()); Console.WriteLine("Salary for employee one : " + employee.CalculateSalary("Employee1")); }
private static void printDetails(Employee employee) { Console.WriteLine("Employee Name :" + employee.Name); Console.WriteLine("Employee Designation :" + employee.Desgination); Console.WriteLine("Employee Dob :" + employee.DOB); Console.WriteLine("Employee Basic :" + employee.Basic); Console.WriteLine("Employee PA :" + employee.Pa); if (employee.GetType().Equals(typeof(Manager))) { Console.WriteLine("Employee HRA :" + employee.HRA); } Console.WriteLine("Employee Salary :" + employee.CalculateSalary()); Console.WriteLine("Employee Age :" + employee.CalculateAge()); Console.WriteLine(); }