IEnumerable<DataRow> q =
from
dr
in
dt.AsEnumerable()
where
dr.Field<
int
>(
"ID"
).ToString() == "1"
select
new{
ID=dr["ID"].ToString(),
Name=dr["Name"].ToString(),
CreateDate=Convert.ToDateTime(dr["CreateDate"]).ToString("yyyy-MM-dd")
}
;
IEnumerable<DataRow> q = dt.AsEnumerable().Where<DataRow>(r => (r.Field<
int
>(
"ID"
).ToString() == "1"
));