I'm refactoring a big C# project and it's only natural to find my snowman's unused dead code.
There's this function called FooBar() which looks useful since it has a bunch of code inside it. As is obvious, I was trying to find the references to this function using the "Find All References (F9)" option and it showed up empty-handed (even with the scope to Entire Solution).
Here is the function:
Class A has:
~
public virtual void FooBar(){
<function is empty>
}
~
I have a Class B with:
public override void FooBar(){
~<doing something important here>~
}
I've ran the "Find All References" on both these functions and nothing showed up. I'm assuming its safe to remove but worried if it is, indeed, used somewhere. Apart from this, I've used the "Find in Files" (with Solution-wide scope) for the method name and it showed up empty too.
My question is: Does "Find All References" obtain all the usages? Can it be relied upon to find and remove dead code if nothing shows up in its results?
EDIT:
This function is not part of an API and would not be called by any external code.