Formatting of jump statements

Completed

Hi there,

is it possible to configure the C# formatting so that jump statements (like return, break, continue, ...) are always preceeded by a line break, so that they are always the first statement in a line? We think this makes it much easier to follow the program flow. 

0
1 comment

Hello!

Thank you for contacting us.
Usually, R# formats code so each statement is on its own line. There are exceptions when those statements are embedded into other statements. To ensure that each statement is on its own line even if it is embedded, set options in ReSharper | Options | Code Editing | C# | Formatting Style | Line Breaks and Wrapping, as shown in the screenshot. 


There are no specific options for line breaks around jump statements, but there are specific options for blank lines before and after such statements (in case when line breaks are already present). You can set it up in ReSharper | Options | Code Editing | C# | Formatting Style | Blank Lines (the screenshot is below).

0

Please sign in to leave a comment.