I want to calculate the HRA, DA etc. I have to define a constructor, But the error pops up mentioning that The variable `basic_salary' is assigned but its value is never used.
code:
public void read()
{
Console.WriteLine("Enter the employee name");
empname = Console.ReadLine();
Console.WriteLine("Enter the basic salary of an employee");
int basic_salary = Convert.ToDouble(Console.ReadLine());
calculate();
}
class program
{
public static void Main(string[] args)
{
Employee employeobj = new Employee();
employeobj.read();
employeobj.display();
}
}