1 foreach (DataRow rows in ds.Tables["dt"].Rows)//在datatable中遍历字段值
2 {
3 Object[] os = rows.ItemArray;
4 foreach (Object o in os)
5 {
6 Console.WriteLine(o);//输出到屏幕
7 }
8 }
posted on 2011-04-17 14:38  dinid  阅读(665)  评论(0编辑  收藏  举报