我有一些这样的代码:
Dim col As Collection = New Collection
col.Add(value1, "key1")
col.Add(value2, "key2")
' later...
For Each item As String In col
' want to get valueX and keyX here; currently, "item" holds the value
Next
如何在循环中同时获取值和键?也许还有另一个课程可以让这更容易?