Say you have a TRY block. I try to write to a file but the file doesn’t exist so it throws an exception.
try
{
TryWritingToFile();
}
catch (Exception)
{
CreateFile();
//now I want to go back and try to write to the file again.
}
How do I go back to the beginning of the try block? Do I need to “re-try” in the catch block? Isn’t this repeating code?
1 Answer