ReSharper 2024.1 Help

Code Inspection: Local function never used

Category

Redundancies in Symbol Declarations

ID

UnusedLocalFunction

EditorConfig

resharper_unused_local_function_highlighting

Default severity

Warning

Language

C#

Requires SWA

No

ReSharper suggests removing unused local functions to clear up the code. You can remove such a function with a quick-fix or write the code that uses it.

public int MyMethod() { int Sum(int x, int y) { return x + y; } return 42; }
public int MyMethod() { return 42; }
Last modified: 15 April 2024