C#遍历List和DataTable
摘要:
其实这两个也都不难,只是有时候会搞混,就记一下。遍历ListEA01Bll EA01 = new EA01Bll();List _ea01 = EA01.GetList(string.Format("EA01006 ={0}", id));第一种:for (int i = 0; i < _ea01.Count; i++){string name = _ea01[i].EA01002;//EA01002是字段(或者属性)}第二种:foreach (EA01 item in _ea01){string name=item.EA01002;}遍历DataTableDataS 阅读全文
posted @ 2014-04-01 11:14 随笔随记 阅读(969) 评论(0) 推荐(0)
浙公网安备 33010602011771号