2

How can I get else to be on one line as it should be? (meaning } else { instead of the version shown below).

I am already using K&R style which fixes all other uses of braces (as shown below), but it does not fix the else.

Bad Format

Pang
  • 9,564
  • 146
  • 81
  • 122
Nick Cardoso
  • 20,807
  • 14
  • 73
  • 124

1 Answers1

2

There is a toggle in the "Editor" > "Code Style" > "C#" settings under the "Line Breaks and Wrapping" tab called "Place 'else' on new line": enter image description here

Disabling this will achieve what you want.

jmkjaer
  • 1,019
  • 2
  • 12
  • 29