Using VB.Net, I’m looking for best practices in dealing with the following idiom:
For i as Integer = 0 To o1.Count - 1
o1(i).x = o2(i).x
Next
What I really want is something VB.Net doesn’t offer — additional and simultaneous iterators on For Each statements.
For Each m1 As c1 In o1, m2 As c2 In o2
m1.x = m2.x
Next
I’m interested in both Linq and non-Linq recommendations, comments about Copy method design, comparisions to C# or other languages.
I submitted a request to extend the For Each statement to implement additional and simultaneous iterators.
http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2923571-allow-additional-clauses-on-for-each-similar-to-c-
I’m still interested in other solutions but until then, this is the answer.