== How to fix it `Contains` is a method defined on the `ICollection` interface and takes a `T item` argument. `Any` is an extension method defined on the `IEnumerable` interface and takes a predicate argument. Therefore, calls with simple equality checks like `Any(x => x == item)` can be replaced by `Contains(item)`. This applies to the following collection types: * https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.hashset-1[HashSet] * https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.sortedset-1[SortedSet] * https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.list-1[List]