This question is similar, but my question seems to be asked in an unanswered comment.
I am creating a C # class. I use alt- insertto add a constructor. I add an argument to the constructor, and then I use alt- enterto create and initialize a field from this argument, for example:
The problem is that my field is created as a field readonly, and in many cases I do not want to create a readonly field.
readonly
readonly int my_int;
How can I say that ReSharper does not add make my read-only field? I tried to do a fairly thorough search in the ReSharper options, but apparently something was missing for me!
- ; , R # (.. readonly), :
public void Bar(int baz) { my_int = baz; }
my_int , , (Alt + Enter) Make field 'my_int' non-readonly.
my_int
Make field 'my_int' non-readonly
, " ", R # , , (, , ...)
. , , - , , alt + readonly. , ReSharper .
, -readonly. IntroduceFieldFix dotPeek. , squigglies, , ( "private readonly $0 $1;" )
IntroduceFieldFix
private readonly $0 $1;
, InitializeFieldFix, , UnusedParameterWarningBase . , IntroduceFieldFix, , .
InitializeFieldFix
UnusedParameterWarningBase
" ". - "Refactor This" (Ctrl + Shift + R) " " . , .