Reputation: 13916
I might have some degree of OCD, maybe that's why it bothers me when I close a line with ';' below a while{}
for{}
or other code block and resharper would automatically insert a line break above my line.
I DO NOT want an extra line.
I looked through the Editing option page under braces and new lines, but nothing seems to jump out.
sample:
if (true){
GC.Collect();
}
string s = "Any statement here, ending the line with ';' causes newline above";
Upvotes: 1
Views: 1122
Reputation: 10917
In ReSharper options: Code Editing
->C#
->Formating Style
->Blank Lines
- set After statements with child blocks
to 0.
Upvotes: 2
Reputation: 17579
Visual Studio (2019) has these formatting settings. I'm assuming you're using VS and resharper isn't doing the formatting.
Tools > Options > Text Editor > C# > Code Style > Formatting > New Line
Find "Place open brace on new line for control blocks". There are a bunch others there as well.
Upvotes: 3