Is a takewhile() checked every iteration using something like yeild, or does it just grab a set of elements all at once?
问题 for instance, let's say I want to do something like this: bool foo(List<strings> stringList, int counter)//assume this list has, like, 10 elements, and counter=3, idk { bool found= false; for(int i=0; i<stringlist.Count && !found; i++) { if(stringlist[i].length < 2 || counter >=6) found=true; counter++; } return found } Now, Is that equivelent to this: bool foo(List<strings> stringList, int counter)//assume this list has, like, 10 elements, and counter=3, idk { bool found= false; foreach