통해 반복하면서 "미리 엿보기",하지만 난이 문제를 접근 할 때마다, 나는/w를 느낄 여기에 '덜 우아한보다는 "사전 항목
솔루션을 끝낼 내 기본적인 질문입니다 : 내가 특정 방식으로 주문한 사전을 통해 반복한다면, 루프의 특정 지점 내에서 사전 항목 'x'를 참조하거나 현재 항목보다 먼저 참조 할 수 있습니까? 현재 열거자를 바꾸지 않고? 예 :
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
미리 감사드립니다.
좋은 접근 방법입니다. 색인이있는 키를 사용하여 2 차 모음을 만들어야하지만 그 방법은 경량이지만 여전히 제네릭을 유지할 수 있습니다. – Nathan