Given a DataTable, how would you merge just one column into a single row?


Given a DataTable structured as such:

How would you go about merging just one column into a single row, separated by a comma as such:

Advice appreciated, thanks.

String.Join(“,”, YourDataTableVar.AsEnumerable.Select(Function (x) x(“Age”).toString.Trim()))

wil create 23,32,45

then delete later the other row’s Age column values

Thanks Peter!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.