Func<T,TResult>, Action and predicate delegates are inbuilts present in the system namespace.

Func delegate can take one or more parameters and returns a value. The parameters can be zero to 16 and the last parameter represents a return value. If there are no input parameters then only last parameter indicating the return value is specified.

Action delegate is also similar to Func delegate in the number of parameters it takes but there is no return time for action delegate that means action delegate doesn’t return any value.

Predict a delicate specify some conditions that are to be satisfied to return either true or false. It takes one parameter and bool return type.

All the three delegates can be assigned with a method or anonymous method or Lambda expressions.

Advertisements