C# break is converted to Exit Try in While-loop with nested Try-Catch-block #182
Description
SD-1757, originally created on 11/12/2010 20:51:43 by Siegfried Pammer
This code:
public class Class1
{
public Class1()
{
while (true) {
try {
break;
} catch (Exception) {
throw;
}
}
}
}
is converted into VB:
Public Class Class1
Public Sub New()
While True
Try
Exit Try ' Should be Exit While
Catch generatedExceptionName As Exception
Throw
End Try
End While
End Sub
End Class
break should be converted into Exit While in this case.
Comment from Daniel Grunwald on 4/12/2012 13:30:12:
Same with 'continue;' inside the catch block.