C# - Line Breaks
Preserve Existing Formatting
Keep existing line breaks
Property names:
[resharper_]csharp_keep_user_linebreaks
, [resharper_]keep_user_linebreaks
Possible values:
true | false
Examples:
Before formatting | After formatting, true |
int·var·=·condition
··?·SomeFunc1()
··:·SomeFunc2(); | int·var·=·condition
····?·SomeFunc1()
····:·SomeFunc2(); |
Before formatting | After formatting, false |
int·var·=·condition
··?·SomeFunc1()
··:·SomeFunc2(); | int·var·=·condition·?·SomeFunc1()·:·SomeFunc2(); |
Break line in single embedded statement
Property names:
[resharper_]csharp_simple_embedded_statement_style
, [resharper_]simple_embedded_statement_style
Possible values:
-
line_break
: Force line breaks -
on_single_line
: Force put on single line -
do_not_change
: Do not change
Examples:
Before formatting | After formatting, line_break |
{
··if·(condition)·DoSomething();
··if·(condition1)
····DoSomething1();
} | {
····if·(condition)
········DoSomething();
····if·(condition1)
········DoSomething1();
} |
Before formatting | After formatting, on_single_line |
{
··if·(condition)·DoSomething();
··if·(condition1)
····DoSomething1();
} | {
····if·(condition)·DoSomething();
····if·(condition1)·DoSomething1();
} |
Before formatting | After formatting, do_not_change |
{
··if·(condition)·DoSomething();
··if·(condition1)
····DoSomething1();
} | {
····if·(condition)·DoSomething();
····if·(condition1)
········DoSomething1();
} |
Break line in single "case" statement
Property names:
[resharper_]csharp_simple_case_statement_style
, [resharper_]simple_case_statement_style
Possible values:
-
line_break
: Force line breaks -
on_single_line
: Force put on single line -
do_not_change
: Do not change
Examples:
Before formatting | After formatting, line_break |
switch(foo)·{
··case·1:·return·a;
··case·2:
····return·b;
} | switch·(foo)
{
····case·1:
········return·a;
····case·2:
········return·b;
} |
Before formatting | After formatting, on_single_line |
switch(foo)·{
··case·1:·return·a;
··case·2:
····return·b;
} | switch·(foo)
{
····case·1:·return·a;
····case·2:·return·b;
} |
Before formatting | After formatting, do_not_change |
switch(foo)·{
··case·1:·return·a;
··case·2:
····return·b;
} | switch·(foo)
{
····case·1:·return·a;
····case·2:
········return·b;
} |
Break line in a block with a single statement
Property names:
[resharper_]csharp_simple_embedded_block_style
, [resharper_]simple_embedded_block_style
Possible values:
-
line_break
: Force line breaks -
on_single_line
: Force put on single line -
do_not_change
: Do not change
Examples:
Before formatting | After formatting, line_break |
{
··if·(condition)·{·DoSomething();·}
··if·(condition1)
··{
····DoSomething1();
··}
} | {
····if·(condition)
····{
········DoSomething();
····}
····if·(condition1)
····{
········DoSomething1();
····}
} |
Before formatting | After formatting, on_single_line |
{
··if·(condition)·{·DoSomething();·}
··if·(condition1)
··{
····DoSomething1();
··}
} | {
····if·(condition)·{·DoSomething();·}
····if·(condition1)·{·DoSomething1();·}
} |
Before formatting | After formatting, do_not_change |
{
··if·(condition)·{·DoSomething();·}
··if·(condition1)
··{
····DoSomething1();
··}
} | {
····if·(condition)·{·DoSomething();·}
····if·(condition1)
····{
········DoSomething1();
····}
} |
Place on New Line
Place "else" on new line
Property names:
csharp_new_line_before_else
, new_line_before_else
Possible values:
true | false
Examples:
true |
if·(condition)
{
····foo();
}
else
{
····foo();
} |
false |
if·(condition)
{
····foo();
}·else
{
····foo();
} |
Place "while" on new line
Property names:
[resharper_]csharp_new_line_before_while
, [resharper_]new_line_before_while
Possible values:
true | false
Examples:
true |
do
{
····foo();
}
while·(condition); |
false |
do
{
····foo();
}·while·(condition); |
Place "catch" on new line
Property names:
csharp_new_line_before_catch
, new_line_before_catch
Possible values:
true | false
Examples:
true |
try
{
····foo();
}
catch·(Exception·e)
{
····foo();
}
finally
{
} |
false |
try
{
····foo();
}·catch·(Exception·e)
{
····foo();
}
finally
{
} |
Place "finally" on new line
Property names:
csharp_new_line_before_finally
, new_line_before_finally
Possible values:
true | false
Examples:
true |
try
{
····foo();
}
catch·(Exception·e)
{
····foo();
}
finally
{
} |
false |
try
{
····foo();
}
catch·(Exception·e)
{
····foo();
}·finally
{
} |
Line Wrapping
Right margin (columns)
Property names:
csharp_max_line_length
, max_line_length
Possible values:
an integer
Wrap formal parameters
Property names:
[resharper_]csharp_wrap_parameters_style
, [resharper_]wrap_parameters_style
Possible values:
-
chop_always
: Chop always -
chop_if_long
: Chop if long or multiline -
wrap_if_long
: Simple wrap
Examples:
chop_always |
void·SomeMethod(int·p1,
····int·p2,
····int·p3,
····int·p4)
{
} |
chop_if_long |
void·SomeMethod(int·p1,
····int·p2,
····int·p3,
····int·p4)
{
} |
wrap_if_long |
void·SomeMethod(int·p1,·int·p2,
····int·p3,·int·p4)
{
} |
Prefer wrap before "(" in declaration
Property names:
[resharper_]csharp_wrap_before_declaration_lpar
, [resharper_]wrap_before_declaration_lpar
Possible values:
true | false
Examples:
true |
void·SomeMethod
(int·p1,·int·p2,·int·p3,
····int·p4)
{
} |
false |
void·SomeMethod(int·p1,·int·p2,
····int·p3,·int·p4)
{
} |
Prefer wrap after "(" in declaration
Property names:
[resharper_]csharp_wrap_after_declaration_lpar
, [resharper_]wrap_after_declaration_lpar
Possible values:
true | false
Examples:
true |
void·SomeMethod(
····int·p1,·int·p2,·int·p3,
····int·p4)
{
} |
false |
void·SomeMethod(int·p1,·int·p2,
····int·p3,·int·p4)
{
} |
Wrap invocation arguments
Property names:
[resharper_]csharp_wrap_arguments_style
, [resharper_]wrap_arguments_style
Possible values:
-
chop_always
: Chop always -
chop_if_long
: Chop if long or multiline -
wrap_if_long
: Simple wrap
Examples:
chop_always |
CallMethod(arg1,
····arg2,
····arg3,
····arg4,
····arg5); |
chop_if_long |
CallMethod(arg1,
····arg2,
····arg3,
····arg4,
····arg5); |
wrap_if_long |
CallMethod(arg1,·arg2,·arg3,
····arg4,·arg5); |
Prefer wrap before "(" in invocation
Property names:
[resharper_]csharp_wrap_before_invocation_lpar
, [resharper_]wrap_before_invocation_lpar
Possible values:
true | false
Examples:
true |
CallMethod
(arg1,·arg2,·arg3,·arg4,
····arg5); |
false |
CallMethod(arg1,·arg2,·arg3,
····arg4,·arg5); |
Prefer wrap after "(" in invocation
Property names:
[resharper_]csharp_wrap_after_invocation_lpar
, [resharper_]wrap_after_invocation_lpar
Possible values:
true | false
Examples:
true |
CallMethod(
····arg1,·arg2,·arg3,·arg4,
····arg5); |
false |
CallMethod(arg1,·arg2,·arg3,
····arg4,·arg5); |
Prefer wrap before ","
Property names:
[resharper_]csharp_wrap_before_comma
, [resharper_]wrap_before_comma
Possible values:
true | false
Examples:
true |
CallMethod(arg1,·arg2,·arg3
····,·arg4,·arg5,·arg6,·arg7); |
false |
CallMethod(arg1,·arg2,·arg3,
····arg4,·arg5,·arg6,·arg7); |
Prefer wrap before "=>" followed by expressions
Property names:
[resharper_]csharp_wrap_before_arrow_with_expressions
, [resharper_]wrap_before_arrow_with_expressions
Possible values:
true | false
Examples:
true |
class·A
{
····public·int·Foo(int·y)
········=>·Br(
············y·*·y·+·y·<<
············y·+·y);
····Func<int,·int,·int>
········Method2()
····{
········return·(xxx,·yyy)
············=>·Br(xxx·*·yyy);
····}
} |
false |
class·A
{
····public·int·Foo(int·y)·=>
········Br(y·*·y·+·y·<<·y·+·y);
····Func<int,·int,·int>
········Method2()
····{
········return·(xxx,·yyy)·=>
············Br(xxx·*·yyy);
····}
} |
Prefer wrap after "."
Property names:
[resharper_]csharp_wrap_after_dot_in_method_calls
, [resharper_]wrap_after_dot_in_method_calls
Possible values:
true | false
Examples:
true |
obj.Method().Method().Method().
····Method().Method().Method().
····Method().Method().Method().
····Method(); |
false |
obj.Method().Method().Method()
····.Method().Method().Method()
····.Method().Method().Method()
····.Method(); |
Wrap chained method calls
Property names:
[resharper_]csharp_wrap_chained_method_calls
, [resharper_]wrap_chained_method_calls
Possible values:
-
chop_always
: Chop always -
chop_if_long
: Chop if long or multiline -
wrap_if_long
: Simple wrap
Examples:
chop_always |
obj.Method()
········.Method()·+
····obj.Method()
········.Method()
········.Method()
········.Method()
········.Method()
········.Method()
········.Method()
········.Method()
········.Method()
········.Method(); |
chop_if_long |
obj.Method().Method()·+
····obj.Method()
········.Method()
········.Method()
········.Method()
········.Method()
········.Method()
········.Method()
········.Method()
········.Method()
········.Method(); |
wrap_if_long |
obj.Method().Method()·+
····obj.Method().Method()
········.Method().Method()
········.Method().Method()
········.Method().Method()
········.Method().Method(); |
Prefer wrap before ":"
Property names:
[resharper_]csharp_wrap_before_extends_colon
, [resharper_]wrap_before_extends_colon
Possible values:
true | false
Examples:
true |
class·Derived
····:·BaseClass,·I1,·I2,·I3,·I4
{
} |
false |
class·Derived·:·BaseClass,·I1,
····I2,·I3,·I4
{
} |
Wrap extends/implements list
Property names:
[resharper_]csharp_wrap_extends_list_style
, [resharper_]wrap_extends_list_style
Possible values:
-
chop_always
: Chop always -
chop_if_long
: Chop if long or multiline -
wrap_if_long
: Simple wrap
Examples:
chop_always |
class·Derived·:·BaseClass,
····I1,
····I2,
····I3,
····I4
{
} |
chop_if_long |
class·Derived·:·BaseClass,
····I1,
····I2,
····I3,
····I4
{
} |
wrap_if_long |
class·Derived·:·BaseClass,·I1,
····I2,·I3,·I4
{
} |
Wrap "for" statement header
Property names:
[resharper_]csharp_wrap_for_stmt_header_style
, [resharper_]wrap_for_stmt_header_style
Possible values:
-
chop_always
: Chop always -
chop_if_long
: Chop if long or multiline -
wrap_if_long
: Simple wrap
Examples:
chop_always |
for·(int·i·=·initial;
····i·<·loopLimit;
····i++)
{
} |
chop_if_long |
for·(int·i·=·initial;
····i·<·loopLimit;
····i++)
{
} |
wrap_if_long |
for·(int·i·=·initial;
····i·<·loopLimit;·i++)
{
} |
Prefer wrap before "?" and ":" in ternary expressions
Property names:
[resharper_]csharp_wrap_before_ternary_opsigns
, [resharper_]wrap_before_ternary_opsigns
Possible values:
true | false
Examples:
true |
return
····hereGoesSomeBoolExpression
········?·returnThisIfTrue
········:·returnThatIfFalse; |
false |
return
····hereGoesSomeBoolExpression·?
········returnThisIfTrue·:
········returnThatIfFalse; |
Wrap ternary expression
Property names:
[resharper_]csharp_wrap_ternary_expr_style
, [resharper_]wrap_ternary_expr_style
Possible values:
-
chop_always
: Chop always -
chop_if_long
: Chop if long or multiline -
wrap_if_long
: Simple wrap
Examples:
chop_always |
myField·=·someCondition
····?·true
····:·false; |
chop_if_long |
myField·=·someCondition
····?·true
····:·false; |
wrap_if_long |
myField·=·someCondition·?·true
····:·false; |
Wrap multiple declaration
Property names:
[resharper_]csharp_wrap_multiple_declaration_style
, [resharper_]wrap_multiple_declaration_style
Possible values:
-
chop_always
: Chop always -
chop_if_long
: Chop if long or multiline -
wrap_if_long
: Simple wrap
Examples:
chop_always |
class·C
{
····public·int·i·=·0,
········j·=·0,
········k·=·2,
········l·=·3,
········m·=·4,
········n·=·5;
} |
chop_if_long |
class·C
{
····public·int·i·=·0,
········j·=·0,
········k·=·2,
········l·=·3,
········m·=·4,
········n·=·5;
} |
wrap_if_long |
class·C
{
····public·int·i·=·0,·j·=·0,
········k·=·2,·l·=·3,·m·=·4,
········n·=·5;
} |
Wrap LINQ expressions
Property names:
[resharper_]csharp_wrap_linq_expressions
, [resharper_]wrap_linq_expressions
Possible values:
-
chop_always
: Chop always -
chop_if_long
: Chop if long or multiline -
wrap_if_long
: Simple wrap
Examples:
chop_always |
var·result·=·from·x·in·list
····where·cond(x)
····select·x; |
chop_if_long |
var·result·=·from·x·in·list
····where·cond(x)
····select·x; |
wrap_if_long |
var·result·=·from·x·in·list
····where·cond(x)·select·x; |
Prefer wrap before operator in binary expression
Property names:
[resharper_]csharp_wrap_before_binary_opsign
, [resharper_]wrap_before_binary_opsign
Possible values:
true | false
Examples:
true |
myField1·=·expression1
···········+·expression2
···········+·expression3
···········+·expression4
···········+·expression5
···········+·expression6
···········+·expression7; |
false |
myField1·=·expression1·+
···········expression2·+
···········expression3·+
···········expression4·+
···········expression5·+
···········expression6·+
···········expression7; |
Wrap chained binary expressions
Property names:
[resharper_]csharp_wrap_chained_binary_expressions
, [resharper_]wrap_chained_binary_expressions
Possible values:
-
chop_if_long
: Chop if long or multiline -
wrap_if_long
: Simple wrap
Examples:
chop_if_long |
b·=·a·!=·b·&&
····c·!=·d·&&
····e·&&
····f.IsSumOf(g,·h)·&&
····i.Value·==·j·&&
····k·==·l·&&
····m·==·n·&&
····o·==·p; |
wrap_if_long |
b·=·a·!=·b·&&·c·!=·d·&&·e·&&
····f.IsSumOf(g,·h)·&&
····i.Value·==·j·&&·k·==·l·&&
····m·==·n·&&·o·==·p; |
Force chop compound condition in "if" statement
Property names:
[resharper_]csharp_force_chop_compound_if_expression
, [resharper_]force_chop_compound_if_expression
Possible values:
true | false
Examples:
true |
if·(var1·==·null·||
····var2·==·null)
····Foo(); |
false |
if·(var1·==·null·||·var2·==·null)
····Foo(); |
Force chop compound condition in "while" statement
Property names:
[resharper_]csharp_force_chop_compound_while_expression
, [resharper_]force_chop_compound_while_expression
Possible values:
true | false
Examples:
true |
while·(var1·==·null·||
·······var2·==·null)
····Foo(); |
false |
while·(var1·==·null·||·var2·==·null)
····Foo(); |
Force chop compound condition in "do" statement
Property names:
[resharper_]csharp_force_chop_compound_do_expression
, [resharper_]force_chop_compound_do_expression
Possible values:
true | false
Examples:
true |
do
{
····Foo();
}·while·(var1·==·null·||
·········var2·==·null); |
false |
do
{
····Foo();
}·while·(var1·==·null·||·var2·==·null); |
Wrap multiple type parameter constraints
Property names:
[resharper_]csharp_wrap_multiple_type_parameer_constraints_style
, [resharper_]wrap_multiple_type_parameer_constraints_style
Possible values:
-
chop_always
: Chop always -
chop_if_long
: Chop if long or multiline -
wrap_if_long
: Simple wrap
Examples:
chop_always |
class·C<T1,·T2,·T3>·where·T1·:·I1
····where·T2·:·new()
····where·T3·:·class |
chop_if_long |
class·C<T1,·T2,·T3>·where·T1·:·I1
····where·T2·:·new()
····where·T3·:·class |
wrap_if_long |
class·C<T1,·T2,·T3>·where·T1·:·I1·where·T2·:·new()
····where·T3·:·class |
Wrap object and collection initializer
Property names:
[resharper_]csharp_wrap_object_and_collection_initializer_style
, [resharper_]wrap_object_and_collection_initializer_style
Possible values:
-
chop_always
: Chop always -
chop_if_long
: Chop if long or multiline -
wrap_if_long
: Simple wrap
Examples:
chop_always |
new·C()
{
····PropertyX·=·1,
····PropertyY·=·2,
····PropertyZ·=·3
} |
chop_if_long |
new·C()
{
····PropertyX·=·1,
····PropertyY·=·2,
····PropertyZ·=·3
} |
wrap_if_long |
new·C()
{
····PropertyX·=·1,·PropertyY·=·2,
····PropertyZ·=·3
} |
Wrap array initializer
Property names:
[resharper_]csharp_wrap_array_initializer_style
, [resharper_]wrap_array_initializer_style
Possible values:
-
chop_always
: Chop always -
chop_if_long
: Chop if long or multiline -
wrap_if_long
: Simple wrap
Examples:
chop_always |
new·C[]
{
····Element1,
····ElementX,
····ElementY,
····ElementZ,
····ElementZzz
} |
chop_if_long |
new·C[]
{
····Element1,
····ElementX,
····ElementY,
····ElementZ,
····ElementZzz
} |
wrap_if_long |
new·C[]
{
····Element1,·ElementX,·ElementY,
····ElementZ,·ElementZzz
} |
Prefer wrap before first constraint
Property names:
[resharper_]csharp_wrap_before_first_type_parameter_constraint
, [resharper_]wrap_before_first_type_parameter_constraint
Possible values:
true | false
Examples:
true |
class·C<T1,·T2,·T3>
····where·T1·:·I1
····where·T2·:·new()
····where·T3·:·class |
false |
class·C<T1,·T2,·T3>·where·T1·:·I1
····where·T2·:·new()
····where·T3·:·class |
Prefer wrap before type parameters opening angle
Property names:
[resharper_]csharp_wrap_before_type_parameter_langle
, [resharper_]wrap_before_type_parameter_langle
Possible values:
true | false
Examples:
true |
class·C
<Type1,·Type2,·Type3,
····Type4>
{
} |
false |
class·C<Type1,·Type2,·Type3,
····Type4>
{
} |
Other
Place abstract/auto property/indexer/event declaration on single line
Property names:
[resharper_]csharp_place_abstract_accessorholder_on_single_line
, [resharper_]csharp_place_simple_blocks_on_single_line
, [resharper_]place_abstract_accessorholder_on_single_line
, [resharper_]place_simple_blocks_on_single_line
Possible values:
true | false
Examples:
true |
interface·I
{
····int·Property·{·get;·set;·}
} |
false |
interface·I
{
····int·Property
····{
········get;
········set;
····}
} |
Place simple property/indexer/event declaration on single line
Property names:
[resharper_]csharp_place_simple_accessorholder_on_single_line
, [resharper_]csharp_place_simple_blocks_on_single_line
, [resharper_]place_simple_accessorholder_on_single_line
, [resharper_]place_simple_blocks_on_single_line
Possible values:
true | false
Examples:
true |
class·C
{
····int·Property·{·get·{·return·x;·}·set·{·x·=·value;·}·}
} |
false |
class·C
{
····int·Property
····{
········get·{·return·x;·}
········set·{·x·=·value;·}
····}
} |
Place it on single line even when it has attributes on accessors
Property names:
[resharper_]csharp_place_accessor_with_attrs_holder_on_single_line
, [resharper_]csharp_place_simple_blocks_on_single_line
, [resharper_]place_accessor_with_attrs_holder_on_single_line
, [resharper_]place_simple_blocks_on_single_line
Possible values:
true | false
Examples:
true |
class·C
{
····int·Property
····{
········[Attr]·get·{·return·x;·}
········[Attr]·set·{·x·=·value;·}
····}
} |
false |
class·C
{
····int·Property
····{
········[Attr]·get·{·return·x;·}
········[Attr]·set·{·x·=·value;·}
····}
} |
Place simple accessor on single line
Property names:
[resharper_]csharp_place_simple_accessor_on_single_line
, [resharper_]csharp_place_simple_blocks_on_single_line
, [resharper_]place_simple_accessor_on_single_line
, [resharper_]place_simple_blocks_on_single_line
Possible values:
true | false
Examples:
true |
class·C
{
····int·Property
····{
········get·{·return·x;·}
········set
········{
············if·(value·==·null)·throw·new·Exception();
········}
····}
} |
false |
class·C
{
····int·Property
····{
········get
········{
············return·x;
········}
········set
········{
············if·(value·==·null)·throw·new·Exception();
········}
····}
} |
Place simple method on single line
Property names:
[resharper_]csharp_place_simple_method_on_single_line
, [resharper_]csharp_place_simple_blocks_on_single_line
, [resharper_]place_simple_method_on_single_line
, [resharper_]place_simple_blocks_on_single_line
Possible values:
true | false
Examples:
true |
class·C
{
····void·Foo()·{·DoSomethingSimple();·}
} |
false |
class·C
{
····void·Foo()
····{
········DoSomethingSimple();
····}
} |
Place simple anonymous method on single line
Property names:
[resharper_]csharp_place_simple_anonymousmethod_on_single_line
, [resharper_]csharp_place_simple_blocks_on_single_line
, [resharper_]place_simple_anonymousmethod_on_single_line
, [resharper_]place_simple_blocks_on_single_line
Possible values:
true | false
Examples:
true |
EventHandler·e·=·delegate·{·return;·}; |
false |
EventHandler·e·=·delegate
{
····return;
}; |
Place simple array, object and collection on single line
Property names:
[resharper_]csharp_place_simple_initializer_on_single_line
, [resharper_]place_simple_initializer_on_single_line
Possible values:
true | false
Examples:
Before formatting | After formatting, true |
var·result·=·new·{·A·=·0·}; | var·result·=·new·{A·=·0}; |
Before formatting | After formatting, false |
var·result·=·new·{·A·=·0·}; | var·result·=·new
{
····A·=·0
}; |
Place type attribute on same line
Property names:
[resharper_]csharp_place_type_attribute_on_same_line
, [resharper_]place_type_attribute_on_same_line
Possible values:
true | false
Examples:
true |
[Attribute]·class·C
{
} |
false |
[Attribute]
class·C
{
} |
Place method attribute on same line
Property names:
[resharper_]csharp_place_method_attribute_on_same_line
, [resharper_]place_method_attribute_on_same_line
Possible values:
true | false
Examples:
true |
class·C
{
····[Attribute]·void·foo()
····{
····}
} |
false |
class·C
{
····[Attribute]
····void·foo()
····{
····}
} |
Place property/indexer/event attribute on same line
Property names:
[resharper_]csharp_place_accessorholder_attribute_on_same_line
, [resharper_]place_accessorholder_attribute_on_same_line
Possible values:
true | false
Examples:
true |
class·C
{
····[Attribute]·int·Property
····{
········get·{·return·x;·}
········set·{·x·=·value;·}
····}
} |
false |
class·C
{
····[Attribute]
····int·Property
····{
········get·{·return·x;·}
········set·{·x·=·value;·}
····}
} |
Place singleline accessor attribute on same line
Property names:
[resharper_]csharp_place_simple_accessor_attribute_on_same_line
, [resharper_]place_simple_accessor_attribute_on_same_line
Possible values:
true | false
Examples:
true |
class·C
{
····int·Property
····{
········[Attribute]·get·{·return·x;·}
········[Attribute]
········set
········{
············x·=·value;
············NotifySomething();
········}
····}
} |
false |
class·C
{
····int·Property
····{
········[Attribute]
········get·{·return·x;·}
········[Attribute]
········set
········{
············x·=·value;
············NotifySomething();
········}
····}
} |
Place multiline accessor attribute on same line
Property names:
[resharper_]csharp_place_complex_accessor_attribute_on_same_line
, [resharper_]place_complex_accessor_attribute_on_same_line
Possible values:
true | false
Examples:
true |
class·C
{
····int·Property
····{
········[Attribute]·get·{·return·x;·}
········[Attribute]·set
········{
············x·=·value;
············NotifySomething();
········}
····}
} |
false |
class·C
{
····int·Property
····{
········[Attribute]·get·{·return·x;·}
········[Attribute]
········set
········{
············x·=·value;
············NotifySomething();
········}
····}
} |
Place field attribute on same line
Property names:
[resharper_]csharp_place_field_attribute_on_same_line
, [resharper_]place_field_attribute_on_same_line
Possible values:
true | false
Examples:
true |
class·C
{
····[Attribute]·int·x;
} |
false |
class·C
{
····[Attribute]
····int·x;
} |
Place constructor initializer on same line
Property names:
[resharper_]csharp_place_constructor_initializer_on_same_line
, [resharper_]place_constructor_initializer_on_same_line
Possible values:
true | false
Examples:
true |
class·C
{
····public·C()·:·base()
····{
····}
} |
false |
class·C
{
····public·C()
········:·base()
····{
····}
} |
Place type constraints on same line
Property names:
[resharper_]csharp_place_type_constraints_on_same_line
, [resharper_]place_type_constraints_on_same_line
Possible values:
true | false
Examples:
true |
class·C<T>·where·T·:·IEnumerable
{
} |
false |
class·C<T>
····where·T·:·IEnumerable
{
} |
Allow comment after '{'
Property names:
[resharper_]csharp_allow_comment_after_lbrace
, [resharper_]allow_comment_after_lbrace
Possible values:
true | false
Examples:
true |
if·(condition)
{·//·comment
····statement;
} |
false |
if·(condition)
{
····//·comment
····statement;
} |