If I have a List(Of x) and a List(Of y) is it possible to iterate over both at the same time?
Something like
for each _x as X, _y as Y in List(of x
You would have to access the enumerators manually. In C#:
using (IEnumerator xe = List1.GetEnumerator()) using (IEnumerator ye = List2.GetEnumerator()) { while (xe.MoveNext() && ye.MoveNext()) { if (xe.Current == ye.Current) { // do something } } }