Declare variable within loop
Closed this issue · 0 comments
incredibleLeitman commented
Instead of having this flag before your loop set to false
SoltMachine/SoltMachine/Program.cs
Lines 36 to 39 in aa6f8cd
and have to reset it after every iteration
SoltMachine/SoltMachine/Program.cs
Line 129 in aa6f8cd
you could just place it in the beginning within your loop: this way it will be set to false for every iteration and you do not have to reset it afterwards.
The way you have implemented it is very error prone because you when modifying your code you need to be aware in what cases you have to reset that variable and must not forget