I need to fill a List with data from a DataColumn fetched in dataset. How can I achieve that in 1 step without looping through the entire table in dataset.
I want something like this:
Dim lst as List (of Integer) = ds.Tables("Customer_Data").Columns(0)
However the above line is wrong as System.Data.DataColumn cannot be converted to System.Collections.Generic.List(Of Integer)
Try the following:
In addition you will need to import the
System.Linqif you are not doing it already.