I have a DataTable (id) that has one column (LinkID). The items in the rows for this column are numbers. I am trying to list these numbers in the following format:
1, 2, 30, 494, etc...
How would I get all of the numbers and list them in that way?
Here is what I have tried:
foreach (DataRow row in id.Rows)
{
foreach (DataColumn column in id.Columns)
{
var test = row[0].ToString();
List<string> ls = new List<string>();
ls.Add(test);
MessageBox.Show(ls.ToString());
}
}
You can the following: