Don't use Convert.ToInt32 for converting user input - it will fail if the user enters nothing, or an invlaid value. For example, if they enter "yes please" or a currency or multiplier symbol: "£45K".
Instead, use int.TryParse which returns a bool: if it fails it returns false and you can report the user error back to the user and get him to correct it.
int salary;
if (!int.TryParse(txtsal.Text, out salary)
{
...
return;
}
You should never rely of users to enter valid info: they will always make mistakes! :laugh: