Automatic insertion of "private"
Whenever I add a new class member in C#, for example:
bool isTrue;
Resharper automatically inserts the word "private" in front of it:
private bool isTrue;
This makes me sad. How do I tell Resharper to NOT insert this keyword proactively? :(
Please sign in to leave a comment.
penciluser schrieb:
ReSharper -> Options -> Languages -> C# -> Formatting Style -> Other ->
Modifiers -> Use explicit private modifier
Regards
Albert
Is it possible to make ReSharper not perfrom any action on this rule?
Having "Use explicit private modifier" checked makes it insert the private modifier
Having "Use explicit private modifier" unchecked makes it remove the modifer if i have added it.
I would llike to have it perform no actio - if i add the modifier, leave it there, if i dont add one, dont insert one.
Alternativly, if i can disable this on a project/file wildcard basis that would work too.
Thanks.
wouldn't it be a good idea to always use an explicit modifier? Code will be more readable with it. And what will you do if MS decides to change the default scope of variables?
Regards
Klaus
Yes, in normal projects I totaly agree in always using Explicit Modifers, however when you have an mspec test, the modifiers make it look far worse:
See this article for what I mean: http://codebetter.com/aaronjensen/2008/10/19/getting-resharper-and-vs-to-play-nice-with-mspec/
Hello Andy,
You can turn off both 'Arrange modifiers in existing code' and 'Use explicit
private modifier' options and ReSharper should not take any actions whether
there's a private modifier or not. Thank you!
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
ok, i agree with you. In this special case the code is in fact more readable B-)
Thats exactly what I was after, thank you.