Delegate Invoke - prodot/ReCommended-Extension GitHub Wiki

Show a suggestion when the Invoke method is used on delegate types.

Example

Action action = ... // not null

action.Invoke(); // redundant "Invoke"

action(); // after applying the quick fix

Exceptions

Action action = null

action?.Invoke(); // "Invoke" is not redundant

Tip

A quick fix is available to remove the Invoke method call.

Note

The analyzer can be configured or deactivated in the ReSharper Options or Rider Settings dialog.

⚠️ **GitHub.com Fallback** ⚠️