Return in catch block?
- by lowlyintern
Is is wrong to have a return statement in a catch block?
What are the alternatives?
i.e:
public bool SomeFunction()
{
try
{
//somecode
return true;
}
catch(Exception ex)
{
MessageBox.Show(ex.message);
return false;
}
}