Reputation: 605
Is there a way to get visual studio to warn that a private member does not have any references within the class? How about internal members that have no references within the package / module?
I have been re-factoring my code and I don't want to keep [right-click] --> Find All References for each member in my code base to ensure I have removed all cruft. There has to be a better way...
Upvotes: 0
Views: 553
Reputation: 25543
ReSharper does something similar with its Solution-Wide Inspections.
Upvotes: 0
Reputation: 755179
Have you tried turning on FxCop performance rules? They will detect unused members with internal or private access.
Upvotes: 2
Reputation: 916
As far as I know, Visual Studio does give warnings for unused variables. Doesn't that cover it? They are not errors, just warnings.
Upvotes: 0