i’m adding rows of a datable to a dictionary, proceed to do something, clear the dictionary then repeat.
is there any linq or a one line code instead of using for each row, then for each column to add the key-value pair?
column name is the key, whereas row value is the value
Dim dataTable As New DataTable()
Dim dictionary = dataTable.Rows.Cast(Of DataRow)() _
.ToDictionary(Function(row) row("ColumnName").ToString(), Function(row) row("ColumnName").ToString())
dictionary.Clear()