This article will show you how you can convert a datatable column into string value by using c#.net. Please check the below code.
Here is the database table values.
Now check the output.
DataTable dt = new DataTable();
var columnarray=
dt.AsEnumerable().Select(s => s.Field<string>"TankName")).Distinct().ToArray();
string value = string.Join(",", columnarray);
|
0 comments:
Please let me know your view