Suppose I have a small database represented in memory as a DataTable, what is the best way to extract a column from that DataTable and put it into a ConcurrentQueue(Of T)?
Or, should I use a different representation than a DataTable?
More details:
-
The ‘database’ is an extract from a larger database, comprising just 3 columns and 100-200 rows.
-
The ConcurrentQueue(Of T) will be consumed by a set of parallel tasks
Clarification:
Let’s say the Data Table contains columns "A", "B", and "C", with rows 1 to 200. I need to create a ConcurrentQueue(Of T) containing the values from column "A" from all rows.
Instead of relying on DataTables why don’t you create a class to hold the data you require and add the functionality to the class (or class List) which will make more semantic sense.