A
Alex Broitman
Guest
for (int attempt = 1; ; attempt++)
{
try
{
DoSomething();
return;
}
catch (Exception) when (attempt == 5)
{
throw;
}
}
For the above example I get "CS0162: Unreachable code detected" warning in the first line on "attempt++".
Is this a bug or I've missed something?
Continue reading...
{
try
{
DoSomething();
return;
}
catch (Exception) when (attempt == 5)
{
throw;
}
}
For the above example I get "CS0162: Unreachable code detected" warning in the first line on "attempt++".
Is this a bug or I've missed something?
Continue reading...