"Write it as
foo.Contains(VALUE)"
The someCollection.Contains(...) method takes an object while Any(...) takes a predicate. So if you want to check for existence of an element, use Contains(...) rather than comparing every item using Any(...).
if(foo.Any(fo => fo == bar))
{
...
}should be 🡻
if(foo.Contains(fo => fo == bar))
{
...
}