score:0

Turn off notifications if the datatable is bounded to anything.:

dt.BeginLoadData(); //  stops notifications on each addition
foreach (object[] values in row)
    dt.Rows.Add(values);
dt.EndLoadData();

And remove .ToArray(); part to prevent second loop each rows again.


Related Articles