I am writing c# code in visual studio code and I didn't install any formatter or beautifier, so I guess "C# for Visual Studio Code (Powered by OmniSharp)" is using a default formatter (whatever that is).
I like to use brackets in case statements, however, the formatter is indenting the bracket as follows.
switch (name)
{
case "Bob":
{
break;
}
case "Jim"
{
break;
}
}
How can I change the formatter so that it doesn't indent the brackets in the case statements?
In visual studio code:
.editorconfig
csharp_indent_case_contents_when_block = false
In visual studio: tools > options > text editor > C# > Code Style > Formatting > Indentation > uncheck "indent case contents (when block) Options menu image
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With