Matthew :
I have "foreach" nested inside of "for". The program goes like this: It goes through the "for" on to the "foreach" and skips the code inside of "foreach" and goes back to "for". Does anyone know why is it doing this? Any help would be appreciated.
Marc Gravell :
The only reason a foreach
is "skipped" is because the sequence being iterated it empty, i.e. GetEnumerator().MoveNext()
is returning false
.
Guess you like
Origin http://10.200.1.11:23101/article/api/json?id=397977&siteId=1