Is there a way to force the C # compiler to issue a warning when the instance variable is hidden (shaded)?

I'm refactoring a little code, and I think I created some instance variables that are hidden (obscured) in older methods. I want to see a warning wherever it is hidden (shading), so I can verify that this is actually what I want (and this is hardly ever what I want). Is there an easy way to do this?

+6
c # compiler-warnings visual-studio-2010
source share
3 answers

If you run Code Analysis, it will display (like CA1500 from Maintanability ).

+5
source share

Have you studied performance tools like Resharper? http://www.jetbrains.com/resharper/

He will find that (and probably will warn you warningly) with minimal effort on your part.

+2
source share

There is no way to force the C # compiler to emit this warning.

+1
source share

All Articles