方法一: //DataSet转换成List<ArticleInfo> public List<ArticleInfo> GetArticleList(DataSet ds) { List<ArticleInfo> list = new List<ArticleInfo>(); ; i < ds.Tables[].Rows.Count; i++) { ArticleInfo model = new ArticleInfo(); model.arttime…
First of all, we have to fetch the records from the database (MS Sqlserver) into the C# DataTable, or we can add dynamic rows to our DataTable. So our code looks like as written below. //* public DataTable getData() { DataTable dt = new DataTable();…