-
Notifications
You must be signed in to change notification settings - Fork 12
Delegate Invoke
Michael Damatov edited this page Sep 10, 2025
·
3 revisions
Show a suggestion when the Invoke method is used on delegate types.
Action action = ... // not null
action.Invoke(); // redundant "Invoke"
action(); // after applying the quick fixAction action = null
action?.Invoke(); // "Invoke" is not redundantTip
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.