C# - Braces Layout
Braces Layout
Type and namespace declaration
Property names:
[resharper_]csharp_type_declaration_braces
, [resharper_]csharp_brace_style
, [resharper_]type_declaration_braces
, [resharper_]brace_style
Possible values:
-
next_line_shifted
: At next line indented (Whitesmiths style) -
next_line_shifted_2
: At next line indented 2 (GNU style) -
next_line
: At next line (BSD style) -
end_of_line
: At end of line (K&R style) -
end_of_line_no_space
: At end of line (no space)
Examples:
Method declaration
Property names:
[resharper_]csharp_invocable_declaration_braces
, [resharper_]csharp_brace_style
, [resharper_]invocable_declaration_braces
, [resharper_]brace_style
Possible values:
-
next_line_shifted
: At next line indented (Whitesmiths style) -
next_line_shifted_2
: At next line indented 2 (GNU style) -
next_line
: At next line (BSD style) -
end_of_line
: At end of line (K&R style) -
end_of_line_no_space
: At end of line (no space)
Examples:
Anonymous method declaration
Property names:
[resharper_]csharp_anonymous_method_declaration_braces
, [resharper_]csharp_brace_style
, [resharper_]anonymous_method_declaration_braces
, [resharper_]brace_style
Possible values:
-
next_line_shifted
: At next line indented (Whitesmiths style) -
next_line_shifted_2
: At next line indented 2 (GNU style) -
next_line
: At next line (BSD style) -
end_of_line
: At end of line (K&R style) -
end_of_line_no_space
: At end of line (no space)
Examples:
Property declaration
Property names:
[resharper_]csharp_accessor_owner_declaration_braces
, [resharper_]csharp_brace_style
, [resharper_]accessor_owner_declaration_braces
, [resharper_]brace_style
Possible values:
-
next_line_shifted
: At next line indented (Whitesmiths style) -
next_line_shifted_2
: At next line indented 2 (GNU style) -
next_line
: At next line (BSD style) -
end_of_line
: At end of line (K&R style) -
end_of_line_no_space
: At end of line (no space)
Examples:
Accessor declaration
Property names:
[resharper_]csharp_accessor_declaration_braces
, [resharper_]csharp_brace_style
, [resharper_]accessor_declaration_braces
, [resharper_]brace_style
Possible values:
-
next_line_shifted
: At next line indented (Whitesmiths style) -
next_line_shifted_2
: At next line indented 2 (GNU style) -
next_line
: At next line (BSD style) -
end_of_line
: At end of line (K&R style) -
end_of_line_no_space
: At end of line (no space)
Examples:
Block under "case" label
Property names:
[resharper_]csharp_case_block_braces
, [resharper_]csharp_brace_style
, [resharper_]case_block_braces
, [resharper_]brace_style
Possible values:
-
next_line_shifted
: At next line indented (Whitesmiths style) -
next_line_shifted_2
: At next line indented 2 (GNU style) -
next_line
: At next line (BSD style) -
end_of_line
: At end of line (K&R style) -
end_of_line_no_space
: At end of line (no space)
Examples:
Array and object initializer
Property names:
[resharper_]csharp_initializer_braces
, [resharper_]csharp_brace_style
, [resharper_]initializer_braces
, [resharper_]brace_style
Possible values:
-
next_line_shifted
: At next line indented (Whitesmiths style) -
next_line_shifted_2
: At next line indented 2 (GNU style) -
next_line
: At next line (BSD style) -
end_of_line
: At end of line (K&R style) -
end_of_line_no_space
: At end of line (no space)
Examples:
Other
Property names:
[resharper_]csharp_other_braces
, [resharper_]csharp_brace_style
, [resharper_]other_braces
, [resharper_]brace_style
Possible values:
-
next_line_shifted
: At next line indented (Whitesmiths style) -
next_line_shifted_2
: At next line indented 2 (GNU style) -
next_line
: At next line (BSD style) -
end_of_line
: At end of line (K&R style) -
end_of_line_no_space
: At end of line (no space)
Examples:
Empty braces formatting
Property names:
[resharper_]csharp_empty_block_style
, [resharper_]empty_block_style
Possible values:
-
together_same_line
: Together on the same line -
together
: Place braces together -
multiline
: On different lines
Examples:
together_same_line |
class·C
{
····void·EmptyMethod()·{·}
} |
together |
class·C
{
····void·EmptyMethod()
····{·}
} |
multiline |
class·C
{
····void·EmptyMethod()
····{
····}
} |