Custom Braces Style

Answered

Hi there!

So, I've got a code style issue that's kind of driving me crazy.

For C# language when trying to configure auto-formatting for braces - I can't create this:

if (someCondition) {

    // Do a thing

} ELSE {

    /// Other thing

}

 

Key here is having the else inline with the start/end brackets.

I know it doesn't follow any defined "style"...but I really don't care. This is how I prefer to write my code, and it drives me insane that I can't use the code cleanup tools because it will automatically kick the else to the next line.

Is this possible? Can I create a custom definition or *something*??

2 comments
Comment actions Permalink

Hello! 

For this, please go to `Preferences | Editor | Code Style | C# => Line Brakes and wrapping | Arrangement of Statements` and set off Place "else" on new line

I hope this helps! Should you have any questions, let us know. 

1
Comment actions Permalink

Thank you so much. I knew there had to be a way, delighted that it was so simple. :D

0

Please sign in to leave a comment.