LIST LINQ/LAMBDA TO FILTER DATA FROM LIST

Hello!

I have this list: List a =[dog,hotdog,doggy,bird, cat, catnip]
Using the parameter “dog” i want to obtain something like this List b= [dog,hotdog,doggy].
To save only elements that contain dog from list a.

Thank you!

YourListVar.Where(Function (x) x.toUpper.Contains("DOG")).toList
grafik

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.