I want to execute the code in the try block again after an exception is caught. Is that possible somehow?
For Eg:
try
{
//execute some code
}
catch(E
There is another way to do it (though as others have mentioned, not really recommended). Here's an example using a file download retry to more closely match the retry
keyword found in Ruby in VB6.
RetryLabel:
try
{
downloadMgr.DownLoadFile("file:///server/file", "c:\\file");
Console.WriteLine("File successfully downloaded");
}
catch (NetworkException ex)
{
if (ex.OkToRetry)
goto RetryLabel;
}