Resharper: how to force introducing new private fields at the bottom of the class?

Posted by Igor Brejc on Stack Overflow See other posts from Stack Overflow or by Igor Brejc
Published on 2009-05-13T15:30:39Z Indexed on 2010/04/04 9:03 UTC
Read the original article Hit count: 197

Filed under:
|

Resharper offers a very useful introduce and initialize field xxx action when you specify a new parameter in a constructor like:

Constructor (int parameter)

The only (minor) nuisance is that it puts the new field at the beginning of the class - and I'm a fan of putting private parts as far away as possible from the prying eyes of strangers ;).

If, however, you already have some private fields in the class, Resharper will put the new field "correctly" (note the quotes, I don't want to start a flame war over this issue) next to those, even if they are at the end of the class.

Is there a way to force Resharper to always put new fields at the end of the class?

UPDATE: OK, I forgot to mention I know about the "Type Members Layout in Options" feature, but some concrete help on how to modify the template to achieve fields placement would be nice.

© Stack Overflow or respective owner

Related posts about resharper

Related posts about coding-style