I need C# equivalent to Java’s continue ?
i have
for (String b : bar) {
<label>
try {
}
catch (EndpointNotFoundException ex) {
continue <label>
}
}
how can i simulate this in C#. i need that when i get exception that i repeat code not go on.
Use goto <label>;
If you only need to continue to the next loop iteration, use continue
.
c# also has labels (which you can jump to with goto
), but please don't use them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With