using System.Collections.Generic;
namespace LightSwitchApplication
public static void Main(string[] args)
TaxDeduction TD = new TaxDeduction();
TD.TotalDeduction_Compute(25);
public decimal result = 0;
EmployeeTax Employee = new EmployeeTax();
public decimal Taxcalc(ref decimal result)
if (Employee.Gender == "Male")
(Gross > 18000.01m && Gross < 50000m)
(Gross > 50000.01m && Gross < 80000m)
else if (Employee.Gender == "Female")
(Gross > 18000.01m && Gross < 50000m)
(Gross > 50000.01m && Gross < 80000m)
public virtual void TotalDeduction_Compute(int Age)
finalresult = Gross * result / Age;
Console.WriteLine("The result is {finalresult}");
class TaxDeduction:SalarySetup
public override void TotalDeduction_Compute(int Age)
Tax = Gross * result / Age;
Console.WriteLine("The result is {0}", Tax);
public string Id {get; set;}
public string Name {get; set;}
public string Gender {get; set;}
public string DOB {get; set;}
public string Salary {get; set;}