DataTable to string array

Go To StackoverFlow.com

0

DataTable: Each element is String.

20120206 ATM Withdrawal                                              100.00           4,000.00
20120117 CHEQUE          To : 001345889                              400.00           3,600.00
20120119 CASH                                       500.00                            4,100.00
20120209 CASH                                       600.00                            5,100.00
20120119 CASH                                       700.00                            5,800.00

It has to be converted into string array & broken into the table or string array having 2 & 3 rows?

2012-04-04 07:58
by jhonnash


1

public ArrayList ConvertDT(ref DataTable dt)
{
    ArrayList converted = new ArrayList(dt.Rows.Count);
    foreach (DataRow row in dt.Rows)
    {
        converted.Add(row);
    }
    return converted;
}
2012-04-04 09:48
by Diego
Ads