c#

foreach (DataRow row in table.Rows)
{
var cls = new Classinfo()
{
Id = Convert.ToInt32(row["Id"]),
Name = Convert.ToString(row["Name"]),
Comment = Convert.ToString(row["Comment"])
};
list.Add(cls);

把classinfo表里的内容全部遍历出来

posted @ 2021-11-16 21:26  浅夏y  阅读(9)  评论(0编辑  收藏  举报