adding "this." to naming guidlines.

I tried to search on this topic but due to the fact that "this" is such a common term I could not find any information on it.

The naming polices at my work is to use lower camel case for instance fields, while inside a function they are diferentiated by having them prefixed by "this."

In the R# settings under Code Editing -> C#->Formatting Style->Other I was able to set 'Force "this." qualifier for instance member' to 'For fields'.

When I rename a field it will automaticly add the "this." for me, but it does not give me any notifications that I should add them (the pyrimid icon) if I have hand typed code that does not include it. Also the "Full Cleanup" cleanup code does not add the "this." members.

What do I need to do to have it fix my existing members and have it remind me while I am typing about future members that I missed?

P.S. In formatting style, what is the diffrence between "For fields" and "For Fields in this class" settings in the dropdown for 'Force "this." qualifier for instance member'?

Please sign in to leave a comment.