2

I have two XPathNodeIterator nodeI1 and nodeI2.

I have a loop which should go through each while(nodeI1.MoveNext())

How can I get this loop to automatically start nodeI2.MoveNext() after nodeI1 is done? I don't want to copy paste all the code and make another while loop.

user391986
  • 29,536
  • 39
  • 126
  • 205
  • @user391986: Changing tags to `xpathnodeiterator`. This doesn't relates to XPath expressions. –  Aug 26 '10 at 20:26

1 Answers1

3

One straightforward way is to put your loop into a method that takes in a node. Then call it twice.

Conrad Frix
  • 51,984
  • 12
  • 96
  • 155