Comment on Real quick question about the "break"

<- View Parent
olsonexi@lemmy.wtf ⁨11⁩ ⁨months⁩ ago

idk, maybe C# just doesn’t have great syntax for the way you’re doing it or something, but I think the simplest solution is the most readable in this case:

for (int i = 1; i &lt; JUST_THE_WORST_NUMBER; i += 2) {
    Console.WriteLine(i);
}

source
Sort:hotnewtop