I have a data table like below. Say I have thousands of records:
+----------------------+ | Col1 | Col2 | +----------------------+ | Value1 | 1 | | Value1,Value2 | 2 | | Value2 | 3 | | Value3,Value1 | 4 | +----------------------+
Col1
can have a single value or value which is delimited by a special character (e.g. ",").
I would like get the distinct values from Col1
in a single LINQ query. I can do this in two steps, but I want it to be done in one step.
Can this be done, either as a list or an array?