Editorconfig Guide.e

Indent case contents when block

EditorConfig key: csharp-indent-case-contents-when-block

Indent case contents when block

csharp-indent-case-contents-when-block

This option controls whether the contents of a block inside a switch case should receive an additional indentation level.

Default value:

true

Possible values:

  • true
  • false

Examples

true
switch(x) {
  case 1:
    {
      x++;
      break;
    }
}
false
switch(x) {
  case 1:
  {
    x++;
    break;
  }
}