Func vs. Action vs. Predicate [duplicate]

The difference between Func and Action is simply whether you want the delegate to return a value (use Func) or not (use Action). Func is probably most commonly used in LINQ – for example in projections: or filtering: or key selection: Action is more commonly used for things like List<T>.ForEach: execute the given action for … Read more

Pass Method as Parameter using C#

You can use the Func delegate in .net 3.5 as the parameter in your RunTheMethod method. The Func delegate allows you to specify a method that takes a number of parameters of a specific type and returns a single argument of a specific type. Here is an example that should work: