How to configure: Add new field below property definition?

How should I configure ReSharper so the Alt-Enter popup menu "Create new field" on m_Filesize with following block

private int FileSize
{
get { return m_FileSize; }
set { m_FileSize = value; }
}


adds m_FileSize accessor at the bottom of the FileSize definition like this?

private int FileSize
{
get { return m_FileSize; }
set { m_FileSize = value; }
}
private int m_FileSize;

2 comments
Comment actions Permalink

Hello alexu,

Currently there is no way of configuring this. You could file request, if
you wish.
However, we'd like to know why do you need this style?

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


IR> How should I configure ReSharper so the Alt-Enter popup menu "Create
IR> new field" on m_Filesize with following block
IR>
IR> private int FileSize
IR> {
IR> get { return m_FileSize; }
IR> set { m_FileSize = value; }
IR> }
IR> adds m_FileSize accessor at the bottom of the FileSize definition
IR> like this?
IR>
IR> private int FileSize
IR> {
IR> get { return m_FileSize; }
IR> set { m_FileSize = value; }
IR> }
IR> private int m_FileSize;


0
Comment actions Permalink

Currently there is no way of configuring this. You
could file request, if you wish.


How would I do this?

However, we'd like to know why do you need this
style?


Because this is the way I organize my .cs sources. I like having private field next to the property - this way whenever I jump to property definition I can see the default value of the private field (therefore default value of the property).

0

Please sign in to leave a comment.