Let Resharper force this keyword on fields

Sorskoot picture Sorskoot · Nov 3, 2010 · Viewed 11.1k times · Source

Does anyone know if it is possible to have resharper force the use of the this keyword when it can be used? For fields and such...

Resharper is capable of showing where it can be removed, but our coding standard tells us to use the this keyword.

Answer

bdukes picture bdukes · Nov 3, 2010

In ReSharper Options, under Code Editing -> C# -> Code Style there is an option for Use "this." qualifier for that you can set for fields, properties, events, and methods.