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(o bject sender, System.EventArg s e)
{
try
{
int intNum = Int32.Parse(txt NumEntry.Text);
long lngNum = Int64.Parse(txt NumEntry.Text);
}
catch (System.FormatE xception fx) //Non integer input
{
MessageBox.Show ("Invalid entry!", "Entry Error!",
MessageBoxButto ns.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(o bject sender, System.EventArg s e)
{
try
{
int intNum = Int32.Parse(txt NumEntry.Text);
long lngNum = Int64.Parse(txt NumEntry.Text);
}
catch (System.FormatE xception fx) //Non integer input
{
MessageBox.Show ("Invalid entry!", "Entry Error!",
MessageBoxButto ns.OK, MessageBoxIcon. Exclamation);
}
finally
{
//unexpected error
}
}
Thanks - Sean
Comment