Why are some unused function names not greyed out

Boris Rusinov 20 Reputation points
2024-06-12T14:03:13.3933333+00:00

So, while most unused/unreferenced functions in the codebase I'm working with have their names greyed out when the function isn't being used anywhere, there'd be the odd one here and there in the same source file with 0 references yet without being greyed out.

I tried building and rebuilding the solution.

I tried a more thorough "Find All References" type search through the codebase via Edit -> Find and Replace -> Find in Files and saw that one of those functions was referenced in two small chunks of commented out code but removing those didn't really fix the issue.

Tried Analyze -> Run Code Analysis (pick one of the two conventions, btw) -> On Solution but that didn't work either.

Anyone got any idea what's going on here? I've attached pictures of the unused functions with greyed out names and of the unused function that hasn't had its name greyed out like it should. And that's making the current refactoring cleanup I have to do of part of the codebase a smidgen harder than it needs to be. User's image

User's image

Developer technologies | Visual Studio | Other
Developer technologies | C#
{count} votes

Accepted answer
  1. KOZ6.0 6,735 Reputation points
    2024-06-12T15:31:46.88+00:00

    Only the scope is different.

    codelensし

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.