T
Tony Johansson
Hello!
When I compile my program where this method ValidateNumericInput below is
part of I get the following warning
Warning 1 The variable 'ex' is declared but never used
It it possible to get rid of this warning for this ex because I'm not using
it but I must have it because of
checking for FormatException.
private bool ValidateNumericInput(Control control)
{
try
{
int temp = int.Parse(control.Text);
}
catch (FormatException ex)
{
return false;
}
return true;
}
//Tony
When I compile my program where this method ValidateNumericInput below is
part of I get the following warning
Warning 1 The variable 'ex' is declared but never used
It it possible to get rid of this warning for this ex because I'm not using
it but I must have it because of
checking for FormatException.
private bool ValidateNumericInput(Control control)
{
try
{
int temp = int.Parse(control.Text);
}
catch (FormatException ex)
{
return false;
}
return true;
}
//Tony