I have a little special question about the for loop. Normally you could do the count as I have declared with a count from 0 - 10.
What I do inside the loop is to identify many scenarios if the count should start from 0 - 10 or vice versa 10 - 0 to "optimize" the speed.
I can change Start, End and StepValues inside the loop but there is one thing left that should be my question.
If I change Start to 10, End to 0 and Step to - Step,
I would want to change "i < End" to "i > End".
So my question is if this is possible in any way to achieve. A kind of "intelligent" loop.
int Start = 0;
int End = 10;
int Step = 1;
for (int i = Start; i < End; i+=Step)
{
//I can change Start to 10 inside the loop
Start = 10;
//I can change End to 0 inside the loop
End = 0;
//I can change Step to a negative value for countdown inside the loop
Step = - Step;
}