C# - Other
- Indentation
- Continuous line indent multiplier
- Indent "case" from "switch"
- Indent nested "using" statements
- Indent nested "fixed" statements
- Indent nested "lock" statements
- Indent nested "for" statements
- Indent nested "foreach" statements
- Indent nested "while" statements
- Indent type constraints
- Don't indent comments started at first column
- Indent method declarations' parenthesis
- Indent method calls' parenthesis
- Indent statement (if, while, for, etc) parenthesis
- Indent type parameter's angles
- Indent type argument's angles
- Indent other parenthesis and brackets
- Align Multiline Constructs
- Method parameters
- First call arguments by '('
- Call arguments
- List of base classes and interfaces
- Expression
- Chained binary expressions
- Chained method calls
- Array, object and collection initializer
- Anonymous method body
- "for" statement header
- Multiple declarations
- Type parameters list
- Type parameter constraints
- LINQ query
- Other
Indentation
Continuous line indent multiplier
Property names:
[resharper_]csharp_continuous_indent_multiplier
, [resharper_]continuous_indent_multiplier
Possible values:
an integer
Examples:
value: 0 |
int·x·=·foo1()·+
foo2(); |
value: 1 |
int·x·=·foo1()·+
····foo2(); |
value: 2 |
int·x·=·foo1()·+
········foo2(); |
Indent "case" from "switch"
Property names:
csharp_indent_switch_labels
, indent_switch_labels
Possible values:
true | false
Examples:
true |
switch·(expression)
{
····case·0:
········break;
} |
false |
switch·(expression)
{
case·0:
····break;
} |
Indent nested "using" statements
Property names:
[resharper_]csharp_indent_nested_usings_stmt
, [resharper_]indent_nested_usings_stmt
Possible values:
true | false
Examples:
Indent nested "fixed" statements
Property names:
[resharper_]csharp_indent_nested_fixed_stmt
, [resharper_]indent_nested_fixed_stmt
Possible values:
true | false
Examples:
true |
fixed·(int*·a·=·&x)
····fixed·(int*·b·=·&y)
········fixed·(int*·c·=·&z)
········{
············foo();
········} |
false |
fixed·(int*·a·=·&x)
fixed·(int*·b·=·&y)
fixed·(int*·c·=·&z)
{
····foo();
} |
Indent nested "lock" statements
Property names:
[resharper_]csharp_indent_nested_lock_stmt
, [resharper_]indent_nested_lock_stmt
Possible values:
true | false
Examples:
true |
lock·(a)
····lock·(b)
········lock·(c)
········{
············foo();
········} |
false |
lock·(a)
lock·(b)
lock·(c)
{
····foo();
} |
Indent nested "for" statements
Property names:
[resharper_]csharp_indent_nested_for_stmt
, [resharper_]indent_nested_for_stmt
Possible values:
true | false
Examples:
Indent nested "foreach" statements
Property names:
[resharper_]csharp_indent_nested_foreach_stmt
, [resharper_]indent_nested_foreach_stmt
Possible values:
true | false
Examples:
Indent nested "while" statements
Property names:
[resharper_]csharp_indent_nested_while_stmt
, [resharper_]indent_nested_while_stmt
Possible values:
true | false
Examples:
true |
while·(a)
····while·(b)
········while·(c)
········{
············foo();
········} |
false |
while·(a)
while·(b)
while·(c)
{
····foo();
} |
Indent type constraints
Property names:
[resharper_]csharp_indent_type_constraints
, [resharper_]indent_type_constraints
Possible values:
true | false
Examples:
Don't indent comments started at first column
Property names:
[resharper_]csharp_stick_comment
, [resharper_]stick_comment
Possible values:
true | false
Examples:
Indent method declarations' parenthesis
Property names:
[resharper_]csharp_indent_method_decl_pars
, [resharper_]indent_method_decl_pars
Possible values:
-
outside_and_inside
: Parenthesis 1x, inside 2x (GNU style) -
none
: No indent -
inside
: Inside parenthesis (BSD/K&R style) -
outside
: Parenthesis and inside equally (Whitesmiths style)
Examples:
Indent method calls' parenthesis
Property names:
[resharper_]csharp_indent_invocation_pars
, [resharper_]indent_invocation_pars
Possible values:
-
outside_and_inside
: Parenthesis 1x, inside 2x (GNU style) -
none
: No indent -
inside
: Inside parenthesis (BSD/K&R style) -
outside
: Parenthesis and inside equally (Whitesmiths style)
Examples:
Indent statement (if, while, for, etc) parenthesis
Property names:
[resharper_]csharp_indent_statement_pars
, [resharper_]indent_statement_pars
Possible values:
-
outside_and_inside
: Parenthesis 1x, inside 2x (GNU style) -
none
: No indent -
inside
: Inside parenthesis (BSD/K&R style) -
outside
: Parenthesis and inside equally (Whitesmiths style)
Examples:
Indent type parameter's angles
Property names:
[resharper_]csharp_indent_typeparam_angles
, [resharper_]indent_typeparam_angles
Possible values:
-
outside_and_inside
: Parenthesis 1x, inside 2x (GNU style) -
none
: No indent -
inside
: Inside parenthesis (BSD/K&R style) -
outside
: Parenthesis and inside equally (Whitesmiths style)
Examples:
outside_and_inside |
void·Method<
········T1,
········T2
····>(); |
none |
void·Method<
T1,
T2
>(); |
inside |
void·Method<
····T1,
····T2
>(); |
outside |
void·Method<
····T1,
····T2
····>(); |
Indent type argument's angles
Property names:
[resharper_]csharp_indent_typearg_angles
, [resharper_]indent_typearg_angles
Possible values:
-
outside_and_inside
: Parenthesis 1x, inside 2x (GNU style) -
none
: No indent -
inside
: Inside parenthesis (BSD/K&R style) -
outside
: Parenthesis and inside equally (Whitesmiths style)
Examples:
Indent other parenthesis and brackets
Property names:
[resharper_]csharp_indent_pars
, [resharper_]indent_pars
Possible values:
-
outside_and_inside
: Parenthesis 1x, inside 2x (GNU style) -
none
: No indent -
inside
: Inside parenthesis (BSD/K&R style) -
outside
: Parenthesis and inside equally (Whitesmiths style)
Examples:
Align Multiline Constructs
Method parameters
Property names:
[resharper_]csharp_align_multiline_parameter
, [resharper_]align_multiline_parameter
Possible values:
true | false
Examples:
true |
void·fooCall(int·firstParameter,
·············int·secondParameter)
{
} |
false |
void·fooCall(int·firstParameter,
····int·secondParameter)
{
} |
First call arguments by '('
Property names:
[resharper_]csharp_align_first_arg_by_paren
, [resharper_]align_first_arg_by_paren
Possible values:
true | false
Examples:
true |
fooCall(
········firstParameter,
········secondParameter); |
false |
fooCall(
····firstParameter,
····secondParameter); |
Call arguments
Property names:
[resharper_]csharp_align_multiline_argument
, [resharper_]align_multiline_argument
Possible values:
true | false
Examples:
true |
fooCall(firstParameter,
········secondParameter); |
false |
fooCall(firstParameter,
····secondParameter); |
List of base classes and interfaces
Property names:
[resharper_]csharp_align_multiline_extends_list
, [resharper_]align_multiline_extends_list
Possible values:
true | false
Examples:
true |
class·C·:·BaseClass,
··········SomeInterface
{
} |
false |
class·C·:·BaseClass,
····SomeInterface
{
} |
Expression
Property names:
[resharper_]csharp_align_multiline_expression
, [resharper_]align_multiline_expression
Possible values:
true | false
Examples:
true |
destination·=·source1
··················?·source2
··················:·source3; |
false |
destination·=·source1
····?·source2
····:·source3; |
Chained binary expressions
Property names:
[resharper_]csharp_align_multiline_binary_expressions_chain
, [resharper_]align_multiline_binary_expressions_chain
Possible values:
true | false
Examples:
true |
var·a·=·someOperand·+·operand2
········+·operand3
········+·operand4 |
false |
var·a·=·someOperand·+·operand2
····+·operand3
····+·operand4 |
Chained method calls
Property names:
[resharper_]csharp_align_multiline_calls_chain
, [resharper_]align_multiline_calls_chain
Possible values:
true | false
Examples:
true |
MyVar.SomeMethod()
·····.OtherMethod()
·····.ThirdMethod(); |
false |
MyVar.SomeMethod()
····.OtherMethod()
····.ThirdMethod(); |
Array, object and collection initializer
Property names:
[resharper_]csharp_align_multiline_array_and_object_initializer
, [resharper_]align_multiline_array_and_object_initializer
Possible values:
true | false
Examples:
Anonymous method body
Property names:
[resharper_]csharp_indent_anonymous_method_block
, [resharper_]indent_anonymous_method_block
Possible values:
true | false
Examples:
true |
FooCall(delegate
········{
············DoSomething();
············return·0;
········}); |
false |
FooCall(delegate
{
····DoSomething();
····return·0;
}); |
"for" statement header
Property names:
[resharper_]csharp_align_multiline_for_stmt
, [resharper_]align_multiline_for_stmt
Possible values:
true | false
Examples:
Multiple declarations
Property names:
[resharper_]csharp_align_multiple_declaration
, [resharper_]align_multiple_declaration
Possible values:
true | false
Examples:
true |
class·C
{
····private·int·i·=·0,
················j·=·10;
} |
false |
class·C
{
····private·int·i·=·0,
········j·=·10;
} |
Type parameters list
Property names:
[resharper_]csharp_align_multline_type_parameter_list
, [resharper_]align_multline_type_parameter_list
Possible values:
true | false
Examples:
Type parameter constraints
Property names:
[resharper_]csharp_align_multline_type_parameter_constrains
, [resharper_]align_multline_type_parameter_constrains
Possible values:
true | false
Examples:
true |
class·C<T1,·T2>·where·T1·:·I1
················where·T2·:·I1
{
} |
false |
class·C<T1,·T2>·where·T1·:·I1
····where·T2·:·I1
{
} |
LINQ query
Property names:
[resharper_]csharp_align_linq_query
, [resharper_]align_linq_query
Possible values:
true | false
Examples:
true |
var·q·=·from·x·in·xs
········where·x·!=·null
········select·x; |
false |
var·q·=·from·x·in·xs
····where·x·!=·null
····select·x; |
Other
Special "else if" treatment
Property names:
[resharper_]csharp_special_else_if_treatment
, [resharper_]special_else_if_treatment
Possible values:
true | false
Examples:
true |
if·(condition)
{
····foo();
}
else·if·(condition)
{
} |
false |
if·(condition)
{
····foo();
}
else
····if·(condition)
····{
····} |
Line feed at end of file
Property names:
csharp_insert_final_newline
, insert_final_newline
Possible values:
true | false
Examples:
Revert to old formatting engine
Property names:
[resharper_]csharp_old_engine
, [resharper_]old_engine
Possible values:
true | false