I have a list of predicates
public List<Func<Album, bool>> Predicates { get; set; }
I'd like to check if a list contains specific predicate.
What I do is this :
bool check = Predicates.Contains(x=>x.AlbumName == "Winter");
But this always returns false even though there is such a predicate in the list. I assume it is because predicates are anonymous methods and each is kind of unique, but still is it possible to compare them somehow?
Predicates.Any
is going to help here?