Editorconfig Guide.e

Indent labels

EditorConfig key: csharp-indent-labels

Indent labels

csharp-indent-labels

This option controls how goto labels should be indented relative to surrounding code.

Default value:

one_less_than_current

Possible values:

  • flush_left
  • one_less_than_current
  • no_change

Examples

flush_left
{
  if(cond)
  {
    goto error;
error:
    log.Error();
  }
}
one_less_than_current
{
  if(cond)
  {
    goto error;
  error:
    log.Error();
  }
}
no_change
{
  if(cond)
  {
    goto error;
    error:
    log.Error();
  }
}