Is finally executed in this case? I wrote this code and couldn’t decide if finally is really executed in this case or not. I would really like some explanations no matter what the answer is.
foreach(string s in allStrings)
{
try
{
//Error happens here
}
catch(Exception ex)
{
//Handle exception
break;
}
finally
{
//Clean up code
}
}
You’ve written 90% of the code that you’d need to answer this question for yourself.
Keep writing.