我想获得Ilist里面的某个字段的值
比如t.ID的值 该怎么做呢?
要转换为datatable吗?
PropertyInfo[] propertys = list[0].GetType().GetProperties();
int id= propertys,value;这样好像不得可以!
比如t.ID的值 该怎么做呢?
要转换为datatable吗?
PropertyInfo[] propertys = list[0].GetType().GetProperties();
int id= propertys,value;这样好像不得可以!
你的T是一个对象实例,而IList<T>是很多个对像的集合,用法如用
IList<T>[0].ID