Remove particular rows using LINQ

in general we would use a filtering with the where operator

dtFiltered =

(From row In dt_A.AsEnumerable()
let v = row("City").ToString.ToUpper.Trim
Where Not v.Equals("KOLKATA")
Select r = row).CopyToDatatable

Handling empty result we do:

Also have a look here

1 Like