I have a string with say 20 productheaders, separated with a comma (arrayProductheaders)
I want to filter a datatable to result in only the rows where the product does not start with one of the product headers
to include the header i use:
dtClientProducten.AsEnumerable.Where(Function(r) arrayProductheaders.Split(","c).Any(Function(x) r(“Product”).ToString.ToUpper.StartsWith(x))).CopyToDataTable
This works like a charm.
to exclude I thought to use
dtClientProducten.AsEnumerable.Where(Function(r) arrayProductheaders.Split(","c).Any(Function(x) not r(“Product”).ToString.ToUpper.StartsWith(x))).CopyToDataTable
This does not give met the result i want.
What am i missing, or how to better this?