Simple way to convert datarow array to datatable
问题 I want to convert a DataRow array into DataTable ... What is the simplest way to do this? 回答1: Why not iterate through your DataRow array and add (using DataRow.ImportRow, if necessary, to get a copy of the DataRow), something like: foreach (DataRow row in rowArray) { dataTable.ImportRow(row); } Make sure your dataTable has the same schema as the DataRows in your DataRow array. 回答2: For .Net Framework 3.5+ DataTable dt = new DataTable(); DataRow[] dr = dt.Select("Your string"); DataTable dt1