ReSharper
 
Get ReSharper
You are viewing the documentation for an earlier version of ReSharper.

Code Inspection: Explicit delegate creation expression is redundant

Last modified: 21 July 2022

Redundant delegate constructor calls may occur, for example, as a result of adding event handlers:

Below, the type of a delegate variable ValueChanged can be inferred from its declaration. To make code shorter, ReSharper suggests removing a redundant explicit delegate’s constructor call: