Answer: No, we can not write, compiler will give error, because finally block has to be run in any case whether exception occurrs or not, so can not leave the body of finally block.
try
{
}
catch
{
}
finally
{
return;//compile time error: Control cannot leave the body of a finally clause
}
Asked In: Many Interviews |
Alert Moderator