C#里面List遍历,怎么简化

比如
这个item是另一个list,list里面又是一个类。
class Detail

public int Id { get; set; }
public string Name{ get; set; }
public string Value{ get; set; }

          List<Detail> item = db.QueryDetail(detailIn);

            DgvTest.Rows.Add();
            DgvTest.Rows[i].Cells[0].Value = item[i].Id;
            DgvTest.Rows[i].Cells[1].Value = item[i].Name;
            DgvTest.Rows[i].Cells[2].Value = item[i].Value;


能不能简化以上的代码

你的DGV可以直接绑定item为数据源了

DgvTest.DataSource=item;