E.g
DataTable dt = new DataTable();
//Adding Columns and names
dt.Columns.Add("ID" ,typeof(int));
dt.Columns.Add("Name",typeof(string));
//Adding Rows and values
dt.Rows.Add(1,"anish");
dt.Rows.Add(2,"marokey");
dt.Rows.Add(2,"varghese");
//querying the result where ID is 2
var result = from p in dt.AsEnumerable()
where p.Field
select p.Field
No comments:
Post a Comment