- I have a ForEach loop that works on a collection of 300+ items.
- The ForEach will loop through the collection items in batches of 50.
- The ForEach uses an index variable which increments by 1 on each loop.
- The ForEach will stop when the variable stop = true.
- When the index variable is greater than 50 we set the variable stop = true and the ForEach loop is stopped.
- The ForEach is contained within a Loop. The Loop will loop until the variable loop > 10.
- When we exit the ForEach we increment the loop variable by 1.
- The Loop restarts the ForEach.
- At this point I the value of my index is 51 however when we re-enter the ForEach the index is reset to 0.
Can anyone else confirm this behaviour?
