@@ -1012,45 +1012,68 @@ csharp_indent_switch_labels = true
1012
1012
### <a name =" label " >Label Positioning</a >
1013
1013
| ** Option Name** | ** Applicable Languages** | ** Visual Studio Default** | ** Supported Version** |
1014
1014
| ----------- | -------------------- | ----------------------| ---------------- |
1015
- | ` csharp_indent_labels ` | C# | one_less | Visual Studio 2017 v. 15.3 |
1015
+ | ` csharp_indent_labels ` | C# | no_change | Visual Studio 2017 v. 15.3 |
1016
1016
1017
1017
1018
1018
| Value | Description
1019
1019
| ------------- | :-------------|
1020
- | one_less | Labels are placed at one less indent to the current context |
1020
+ | flush_left | Labels are placed at the leftmost column |
1021
+ | one_less_than_current | Labels are placed at one less indent to the current context |
1021
1022
| no_change | Labels are placed at the same indent as the current context |
1022
1023
1023
1024
#### Applied:
1025
+
1024
1026
``` csharp
1025
- // csharp_indent_labels = one_less
1026
- private string MyMethod ( .. .)
1027
+ // csharp_indent_labels= flush_left
1028
+ class C
1027
1029
{
1028
- if (.. .) {
1029
- goto error ;
1030
- }
1030
+ private string MyMethod (...)
1031
+ {
1032
+ if (.. .) {
1033
+ goto error ;
1034
+ }
1031
1035
error :
1032
- throw new Exception (.. .);
1036
+ throw new Exception (.. .);
1037
+ }
1038
+ }
1039
+ ```
1040
+
1041
+ ``` csharp
1042
+ // csharp_indent_labels = one_less_than_current
1043
+ class C
1044
+ {
1045
+ private string MyMethod (...)
1046
+ {
1047
+ if (.. .) {
1048
+ goto error ;
1049
+ }
1050
+ error :
1051
+ throw new Exception (.. .);
1052
+ }
1033
1053
}
1034
1054
1035
1055
```
1036
1056
1037
1057
``` csharp
1038
1058
// csharp_indent_labels= no_change
1039
- private string MyMethod ( .. .)
1059
+ class C
1040
1060
{
1041
- if (.. .) {
1042
- goto error ;
1061
+ private string MyMethod (...)
1062
+ {
1063
+ if (.. .) {
1064
+ goto error ;
1065
+ }
1066
+ error :
1067
+ throw new Exception (.. .);
1043
1068
}
1044
- error :
1045
- throw new Exception (.. .);
1046
1069
}
1047
1070
```
1048
1071
1049
1072
#### Example editorconfig file:
1050
1073
```
1051
1074
# CSharp formatting settings:
1052
1075
[*.cs]
1053
- csharp_indent_labels = one_less
1076
+ csharp_indent_labels = flush_left
1054
1077
```
1055
1078
1056
1079
## <a name =" spacing " >Spacing Options</a >
0 commit comments