I have a FormCollection and I just want to only iterate through the keys the do not contain the string pricing.
So what I tried was this...
foreach (var key in collection.AllKeys.Where(k => !k.Contains("Pricing"))){ ... }
The problem is the return is not a filtered list its returning boolean values... in which in need the filtered list of string...
AllKeys returns a string[] so in a sense I am just trying to filter a string[] here...
What I am missing here...
Thanks much!
Here is the answer...
foreach (var key in collection.AllKeys.Where(k => !k.Contains("Pricing")).ToArray<string>()){ ... }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With