Domanda

I would like to add a blank line after a closing bracket inside of a method. I cannot find a setting for this. Here is some sample code.

What I have:

if (something != null) {
    something = 1;
}    
var andThen = 2;

What I want:

if (something != null) {
    something = 1;
}

var andThen = 2;

edit: I have version 8.1.23.546.

È stato utile?

Soluzione 2

I just wanted to comment that this will be fixed in version 2017.3 of R# and that it is already fixed in R# 2017.3 EAP 7 which can be downloaded from here.

Updated C# Formatting Style options for blank lines before and after statements with blocks, control transfer as well as multiline statements.

This can be configured in the R# options under Formatting Style => Blank Lines => Before/After statements with child blocks.

Altri suggerimenti

No, that is not possible in ReSharper, at least not in version 7.0.1.

There is nothing of the kind in Formatting Style -> Braces Layout, nothing in Formatting Style -> Blank Lines and nothing in Formatting Style -> Line Breaks and Wrapping.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top