Code inspection: Local function is never used
This inspection reports a local function that is declared but never called and never assigned to a delegate. It mirrors the compiler warning for an unused local function.
Example
void M()
{
void Helper()
{
Console.WriteLine("unused");
}
}
void M()
{
}
Quick-fix
The quick-fix removes the unused local function.
13 April 2026