minus-squareolsonexi@lemmy.wtftoProgramming@programming.dev•Real quick question about the "break"linkfedilinkarrow-up2·1 year agoidk, 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 < JUST_THE_WORST_NUMBER; i += 2) { Console.WriteLine(i); } linkfedilink
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 < JUST_THE_WORST_NUMBER; i += 2) { Console.WriteLine(i); }