| What do you mean by Predicate Delegate in cSharp?
When we say about Predicate Delegate in c# it is like Func and Action delegates. And this will represents a method which contains a set or criteria and checks whether the parameter passed meets criteria that are set.
And this Predicate Delegate methods must take one input parameter and return boolean values(True or False).
And the Predicate delegate is mainly defined in the System Namespace.
And below is the Predicate signature:-
public delegate bool Predicate< in T >(T obj);
When we say about the other delegate type, Predicate can also be used with any anonymous method, method or lambda expression.
Below is the example of Predicate delegate:-
| | |