Update Field Value in DataTable using Linq in C#

Update Field Value in DataTable using Linq in C#

Update Field Value in DataTable using Linq in C#:-

IEnumerable<DataRow> rows = DataTableObject.Rows.Cast<DataRow>().Where(r => r[“EmployeeId”].ToString() == “0123 “&& r[“Name”].ToString() == “Abdul”);

rows.ToList().ForEach(r => r.SetField(“EmployeWorking”, “Y”));
rows.ToList().ForEach(r => r.SetField(“EmployeeLocation”, “Microsoft”));

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply