I'm having problems doing a For Each loop on a "List(Of KeyValuePair(Of" collection.
I'm passing a ParamArray to a Function
ParamArray args() As List(Of KeyValuePair(Of String, Integer))
I'm then trying to do a For Each on the Collection
For Each arg As KeyValuePair(Of String, Integer) In args
The error I'm getting is:
Value of type 'System.Collections.Generic.List(Of System.Collections.Generic.KeyValuePair(Of String, Integer))' cannot be converted to 'System.Collections.Generic.KeyValuePair(Of String, Integer)'
I just can't figure out how to do this, and I can't find any examples of how to do this.
My only thought right now is to do
For Each arg As Object In args
Then converting the object to a KeyValuePair, but there must be a neater way of doing this...