c#中怎么用for循环遍历DataTable中的数据?

来源:互联网 发布:flotherm软件英文翻译 编辑:程序博客网 时间:2024/06/08 18:28

c#中怎么用for循环遍历DataTable中的数据?

for (int i = 0; i < dataTable.Rows.Count; i++)
{
    for (int j = 0; j < dataTable.Columns.Count; j++)
    {
        Console.WriteLine(dataTable.Rows[i][j].ToString()); 
    
}
0 0
原创粉丝点击