c# - How to delete rows from DataTable with LINQ? - Stack Overflow

PHOTO EMBED

Mon May 02 2022 18:55:02 GMT+0000 (UTC)

Saved by @javicinhio #cs

var query = dTable.AsEnumerable().Where(r => r.Field<string>("col1") == "ali");

foreach(var row in query.ToList())
   row.Delete();
content_copyCOPY

https://stackoverflow.com/questions/18854395/how-to-delete-rows-from-datatable-with-linq