This seems like it should be something very easy to do, but every time I approach this issue, I end up w/ solutions that feel "less than elegant"
Here is my basic question: If I am looping through a dictionary that I have ordered in a particular way, within any given point in the loop how can I "peek" or get reference to a dictionary item 'x' places ahead of the current item without changing the current enumerator? For instance:
Dim tempDictionary = New Dictionary(Of String, String)
tempDictionary.Add("TestName1", "TestValue1")
tempDictionary.Add("TestName2", "TestValue2")
tempDictionary.Add("TestName3", "TestValue3")
'... and so on ... '
For Each Item In tempDictionary
DoStuff(Item)
'Here is the point in which I want to see what the value of the'
'dictionary item that is 1, 2, 3, [x] places in front of the current'
'item without interfering w/ the current loop.'
'CODE'
Next
Thanks in advance!