Hello i have been trying to convert a datatable into dictionary using this code:
(From d In dt.AsEnumerable
Let kvp = New KeyValuePair(Of string, string)(d(1).toString,d(2).toString)
Select kvp).ToDictionary(of string, string)Function (x) x.Key, Function (x) x.Value)
My question is what if i need to define multiple kvps based on a specific column of the dt, example
mydt would be like this
my dictionary should look like this
Appreciate your help guys.