Func vs. Action.

The difference between Func and Action is simply whether you want the delegate to return a value (use Func) or not (use Action).

Func<TResult> series of delegates are pointers to methods which take zero, one or more input parameters, and return a value of the type specified by the TResult parameter.

Action series of delegatee are pointers to methods which take zero, one or more input parameters, and do not return anything.

Predicate<T> represents a method that defines a set of criteria and determines whether the specified object meets those criteria.

Now you must be wondering what is the difference between Func and Predicate. Basically, those are the same, but there is a one significant difference.

A Predicate can only be used point to methods which will return bool. If the pointing method returning something other than a bool value, you can’t use predicate.

Share this post:Tweet about this on TwitterShare on Facebook0Share on LinkedIn0Share on Google+0Share on Reddit0Email this to someoneDigg this