How can I tell ReSharper to stop creating readonly fields?

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:

alt text

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 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!

+5
3

- ; , R # (.. readonly), :

public void Bar(int baz)
{
    my_int = baz;
}

my_int , , (Alt + Enter) Make field 'my_int' non-readonly.

, " ", R # , , (, , ...)

+4

. , , - , , alt + readonly. , ReSharper .

, -readonly. IntroduceFieldFix dotPeek. , squigglies, , ( "private readonly $0 $1;" )

, InitializeFieldFix, , UnusedParameterWarningBase . , IntroduceFieldFix, , .

+2

" ". - "Refactor This" (Ctrl + Shift + R) " " . , .

+2

All Articles