C#C
C#3y ago
uselessxp

✅ mistery -foreach cycle executed three times for no apparently reason

Here is the code.

I checked more and more times for errors, I always putted some breakpoint in order to see into variables, and I just seeing that when the cycle arrive at the last char contained in input (that's a string), it just rest all index to 0 and start again for a total of 3 executions.

Am I committing error somewhere? 🧐
image.png
Was this page helpful?