W
What-A-Tool
In the following code, "catch" is underlined in blue, and the error "the
variable fx is declared but never used" is displayed when I mouse hover over
it.
Am I doing something wrong, or do I just ignore it?
private void btnCalc_Click(object sender, System.EventArgs e)
{
try
{
int intNum = Int32.Parse(txtNumEntry.Text);
long lngNum = Int64.Parse(txtNumEntry.Text);
}
catch (System.FormatException fx) //Non integer input
{
MessageBox.Show("Invalid entry!", "Entry Error!",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
finally
{
//unexpected error
}
}
Thanks - Sean
variable fx is declared but never used" is displayed when I mouse hover over
it.
Am I doing something wrong, or do I just ignore it?
private void btnCalc_Click(object sender, System.EventArgs e)
{
try
{
int intNum = Int32.Parse(txtNumEntry.Text);
long lngNum = Int64.Parse(txtNumEntry.Text);
}
catch (System.FormatException fx) //Non integer input
{
MessageBox.Show("Invalid entry!", "Entry Error!",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
finally
{
//unexpected error
}
}
Thanks - Sean