forloop withを使用して手を試しましDictionaryたが、本当にやりたいことを達成できませんでした。
特定の変数がSomeVariableあり、この変数の値で機能させたいと考えていforeachます。SomeVariableすることができます1,2,3 or 4
つまり、 内の最初の 3 つのインデックス (0,1,2) から最後のものを取得したいとしSomeVariableます。1item.valueSomeCollection
そして、SomeVariable内の次の 3 つのインデックス (3,4,5) の中から2最後のものを取得したい場合。item.valueSomeCollection
等々...
For Each item As KeyValuePair(Of String, Integer) In SomeCollection
If SomeVariable = 1 Then
//....
ElseIf SwitchCount = 2 Then
//....
End If
Next