Continuing in our weekly blog post series that highlights a few of the new additions to the Framework Design Guidelines 2nd edition .. This content is found in the Events and Callbacks section of Chapter 6: Designing for Extensibility. I am impressed by how simple new additions to the BCL can have such a large (and positive) effect on framework design. As these new advances come out, learn them and use them! DO use the new Func<…>, Action<…>, or Expression<…> instead of custom delegates, when defining APIs with callbacks. Func<…> and Action<…> represent generic delegates. The following is how .NET Framework defines them: public delegate void Action() public delegate void Action<T1...(read more) ...
Go to the complete details ...