111310
(Lewis Lu)
1
Excuse me, I would like to use foreach to finish my idea
this is my sequence:
in this sequence ,i hope i get the “writeline” ,and it would print 1~50,
a is a variable,and a = a+1, it likes a++
when i run this sequence, the “enumerable.range” can’t update,
so i have a question ,what’s wrong i do?
please help me,thank you!
msan
(Michel SAN)
2
You’re modifying to object you iterate over… I don’t know how VB handles it but it is generally prone to errors.
ForEach
iterates over the iterable passed as Values. you can just write item.ToString
at each iteration.
If you want to handle a counter by yourself, you can use a While
activity
Please read the following on SO for an explanation about the update failure on an IEnumerable