C# – Convert DataRowCollection to DataRow[]

c++datarowdatarowcollectionperformance

What's the best performing way to convert a DataRowCollection instance to a DataRow[]?

Best Solution

DataRow[] rows = dt.Select();

Assuming you still have access to the datatable.