I've try catch finally block and if some exception occurs I'll return from the catch block, so finally block is still executed, if so, when? Before return or after return?
Is this the right practice?
try
{
// do something
}
catch (Exception)
{
return false;
}
finally
{
if (connection.State == ConnectionState.Open) connection.Close();
}