Continue in catch block

c#, exception

Solution

`continue` let you to skip the remaining statments in the current loop, and jump to the next iteration.

Given the code we have right now, it makes no difference. Since there is no more code after `if (e.Number == 64) { continue; }`.

Problem

Is this: ``` // retry for (int i = 0; i < length; ++i) { try { sqlCommand.ExecuteNonQuery(); } catch (SqlException e) { if (e.Number == 64) { continue; } } } ``` equivalent to: ``` // retry for (int i = 0; i < length; ++i) { try { sqlCommand.ExecuteNonQuery(); } catch (SqlException e) { } } ``` (since the loop will continue anyway in latter case) What is the difference (if any)?

Original source