C# Insert ArrayList in DataRow
Posted
by
Emre Kabaoglu
on Stack Overflow
See other posts from Stack Overflow
or by Emre Kabaoglu
Published on 2012-04-03T23:14:47Z
Indexed on
2012/04/03
23:28 UTC
Read the original article
Hit count: 203
c#
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.
© Stack Overflow or respective owner