Why was Func<T, TResult>(..) introduced with .NET 3.0 whereas Action<T>(..) with .NET 2.0?
Edit: I’m coding a project in .NET 2.0 right now and am missing Func. Although it’s easy to roll your own as mentioned in the comments and answers i.e. simple delegate TResult Func<T,TResult>(T); I am curious why the timing would be different with two items so similar in nature.
Action<T>andPredicate<T>were probably added because of the methods onList<T>. It wasn’t until C# 3.5 that lambdas were introduced and general delegates like these were particularly convenient.But as John mentioned, just create your own. There’s nothing special about those delegates.