6 Replies
you have two choices:
1. put a label and use a goto https://stackoverflow.com/a/1548160/9731532
2. make a local function where you can use normal returns to implement that
Stack Overflow
is there a equivalent of Java's labelled break in C# or a workaround
I am converting some Java code to C# and have found a few labelled "break" statements (e.g.)
label1:
while (somethingA) {
...
while (somethingB) {
if (condition) {
...
the second option is better
Thanks
np
!close
Closed!
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.