C# Insert ArrayList in DataRow
- by Emre Kabaoglu
I want to insert an arraylist in Datarow.
using this code,
ArrayList array=new ArrayList();
foreach (string s in array)
{
valuesdata.Rows.Add(s);
}
But My datatable must have only one datarow. My code created eight datarows.
I tried,
valuesdata.Rows.Add(array);
But it doesn't work.That should be
valuesdata.Rows.Add(array[0],array[1],array[2],array[3]....);
How can I solve this problem?
Thanks.