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

Greetings,

Given a DataTable structured as such:
image

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

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.