C# の EditorConfig プロパティ: スペース
このページでは、カスタム JetBrains Rider EditorConfig プロパティを使用して C# のさまざまな構成要素におけるスペースの挿入や削除といったフォーマットの環境設定を構成できます。
既存のフォーマットを保持する
内部の余分なスペース
プロパティ名:
[resharper_]csharp_extra_spaces, [resharper_]extra_spaces
可能な値:
remove_all: 余分なスペースをすべて削除するleave_tabs: 余分なタブを残すleave_multiple: 複数の余分なスペースを残すleave_all: スペースとタブをすべて残す
例:
フォーマット前 | フォーマット後 remove_all |
|---|---|
{
var x = foo ( 5 ) ;
var xx = foo ( 5 + 6 ) ;
var xxx = foo ( 5 + 6 + 7 ) ;
var tab = foo ( 5 ) ;
var tabx = foo ( 5 + 6 ) ;
var tabxx = foo ( 5 + 6 + 7 ) ;
}
| {
var x = foo(5);
var xx = foo(5 + 6);
var xxx = foo(5 + 6 + 7);
var tab = foo(5);
var tabx = foo(5 + 6);
var tabxx = foo(5 + 6 + 7);
}
|
フォーマット前 | フォーマット後 leave_tabs |
|---|---|
{
var x = foo ( 5 ) ;
var xx = foo ( 5 + 6 ) ;
var xxx = foo ( 5 + 6 + 7 ) ;
var tab = foo ( 5 ) ;
var tabx = foo ( 5 + 6 ) ;
var tabxx = foo ( 5 + 6 + 7 ) ;
}
| {
var x = foo(5);
var xx = foo(5 + 6);
var xxx = foo(5 + 6 + 7);
var tab = foo ( 5 ) ;
var tabx = foo ( 5 + 6 ) ;
var tabxx = foo ( 5 + 6 + 7 ) ;
}
|
フォーマット前 | フォーマット後 leave_multiple |
|---|---|
{
var x = foo ( 5 ) ;
var xx = foo ( 5 + 6 ) ;
var xxx = foo ( 5 + 6 + 7 ) ;
var tab = foo ( 5 ) ;
var tabx = foo ( 5 + 6 ) ;
var tabxx = foo ( 5 + 6 + 7 ) ;
}
| {
var x = foo(5 );
var xx = foo(5 + 6 );
var xxx = foo(5 + 6 + 7);
var tab = foo(5);
var tabx = foo(5 + 6);
var tabxx = foo(5 + 6 + 7);
}
|
フォーマット前 | フォーマット後 leave_all |
|---|---|
{
var x = foo ( 5 ) ;
var xx = foo ( 5 + 6 ) ;
var xxx = foo ( 5 + 6 + 7 ) ;
var tab = foo ( 5 ) ;
var tabx = foo ( 5 + 6 ) ;
var tabxx = foo ( 5 + 6 + 7 ) ;
}
| {
var x = foo ( 5 ) ;
var xx = foo ( 5 + 6 ) ;
var xxx = foo ( 5 + 6 + 7 ) ;
var tab = foo ( 5 ) ;
var tabx = foo ( 5 + 6 ) ;
var tabxx = foo ( 5 + 6 + 7 ) ;
}
|
ステートメントの括弧の前
'if' の丸括弧
プロパティ名:
C# の制御フローステートメント内のキーワード後のスペース、 [resharper_]csharp_space_before_if_parentheses、 [resharper_]space_before_if_parentheses、 [resharper_]制御フローステートメントのキーワード後のスペース
可能な値:
真 | 偽
例:
真 |
|---|
if (condition)
{
foo();
}
else
{
foo();
}
|
false |
|---|
if(condition)
{
foo();
}
else
{
foo();
}
|
'while' の丸括弧
プロパティ名:
C# の制御フローステートメント内のキーワード後のスペース、 [resharper_]csharp_space_before_while_parentheses、 [resharper_]space_before_while_parentheses、 [resharper_]制御フローステートメントのキーワード後のスペース
可能な値:
真 | 偽
例:
真 |
|---|
while (condition)
{
do
{
foo();
} while (condition);
}
|
false |
|---|
while(condition)
{
do
{
foo();
} while(condition);
}
|
'catch' の丸括弧
プロパティ名:
C# の制御フローステートメント内のキーワード後のスペース、 [resharper_]csharp_space_before_catch_parentheses、 [resharper_]space_before_catch_parentheses、 [resharper_]制御フローステートメントのキーワード後のスペース
可能な値:
真 | 偽
例:
真 |
|---|
try
{
foo();
}
catch (Exception e)
{
}
|
false |
|---|
try
{
foo();
}
catch(Exception e)
{
}
|
'switch' の丸括弧
プロパティ名:
C# の制御フローステートメント内のキーワード後のスペース、 [resharper_]csharp_space_before_switch_parentheses、 [resharper_]space_before_switch_parentheses、 [resharper_]制御フローステートメントのキーワード後のスペース
可能な値:
真 | 偽
例:
真 |
|---|
switch (expr)
{
case 0:
break;
}
|
false |
|---|
switch(expr)
{
case 0:
break;
}
|
'for' の丸括弧
プロパティ名:
C# の制御フローステートメント内のキーワード後のスペース、 [resharper_]csharp_space_before_for_parentheses、 [resharper_]space_before_for_parentheses、 [resharper_]制御フローステートメントのキーワード後のスペース
可能な値:
真 | 偽
例:
真 |
|---|
for (int i = 0; i < 10; i++)
{
foo();
}
|
false |
|---|
for(int i = 0; i < 10; i++)
{
foo();
}
|
'foreach' の丸括弧
プロパティ名:
C# の制御フローステートメント内のキーワード後のスペース、 [resharper_]csharp_space_before_foreach_parentheses、 [resharper_]space_before_foreach_parentheses、 [resharper_]制御フローステートメントのキーワード後のスペース
可能な値:
真 | 偽
例:
真 |
|---|
foreach (object o in collection)
{
foo();
}
|
false |
|---|
foreach(object o in collection)
{
foo();
}
|
'using' 括弧
プロパティ名:
C# の制御フローステートメント内のキーワード後のスペース、 [resharper_]csharp_space_before_using_parentheses、 [resharper_]space_before_using_parentheses、 [resharper_]制御フローステートメントのキーワード後のスペース
可能な値:
真 | 偽
例:
真 |
|---|
using (C c = new C())
{
foo();
}
|
false |
|---|
using(C c = new C())
{
foo();
}
|
'lock' 括弧
プロパティ名:
C# の制御フローステートメント内のキーワード後のスペース、 [resharper_]csharp_space_before_lock_parentheses、 [resharper_]space_before_lock_parentheses、 [resharper_]制御フローステートメントのキーワード後のスペース
可能な値:
真 | 偽
例:
真 |
|---|
lock (this)
{
foo();
}
|
false |
|---|
lock(this)
{
foo();
}
|
'fixed' 括弧
プロパティ名:
C# の制御フローステートメント内のキーワード後のスペース、 [resharper_]csharp_space_before_fixed_parentheses、 [resharper_]space_before_fixed_parentheses、 [resharper_]制御フローステートメントのキーワード後のスペース
可能な値:
真 | 偽
例:
真 |
|---|
fixed (int* fib = new int[1])
{
foo();
}
|
false |
|---|
fixed(int* fib = new int[1])
{
foo();
}
|
他の括弧の前
メソッド呼び出しの丸括弧
プロパティ名:
C# のメソッド呼び出し名と開き丸括弧の間のスペース、 [resharper_]csharp_space_before_method_call_parentheses、 [resharper_]メソッド呼び出し丸括弧前のスペース、 [resharper_]メソッド呼び出し名と開き丸括弧の間のスペース
可能な値:
真 | 偽
例:
真 |
|---|
void Method()
{
foo1 ("string", true);
foo2();
}
|
false |
|---|
void Method()
{
foo1("string", true);
foo2();
}
|
メソッド呼び出しの空の丸括弧
プロパティ名:
C# のメソッド呼び出し名と開き丸括弧の間のスペース、 [resharper_]csharp_space_before_empty_method_call_parentheses、 [resharper_]空のメソッド呼び出し丸括弧前のスペース、 [resharper_]メソッド呼び出し名と開き丸括弧の間のスペース
可能な値:
真 | 偽
例:
真 |
|---|
void Method()
{
foo1("string", true);
foo2 ();
}
|
false |
|---|
void Method()
{
foo1("string", true);
foo2();
}
|
メソッド宣言の丸括弧
プロパティ名:
C# のメソッド宣言名と開き丸括弧の間のスペース、 [resharper_]csharp_space_before_method_parentheses、 [resharper_]space_before_method_parentheses、 [resharper_]メソッド宣言名と開き丸括弧の間のスペース
可能な値:
真 | 偽
例:
真 |
|---|
class C
{
public abstract void Method1 (string str);
public abstract void Method2();
}
|
false |
|---|
class C
{
public abstract void Method1(string str);
public abstract void Method2();
}
|
メソッド宣言の空の丸括弧
プロパティ名:
C# のメソッド宣言名と開き丸括弧の間のスペース、 [resharper_]csharp_space_before_empty_method_parentheses、 [resharper_]space_before_empty_method_parentheses、 [resharper_]メソッド宣言名と開き丸括弧の間のスペース
可能な値:
真 | 偽
例:
真 |
|---|
class C
{
public abstract void Method1(string str);
public abstract void Method2 ();
}
|
false |
|---|
class C
{
public abstract void Method1(string str);
public abstract void Method2();
}
|
'typeof' 括弧
プロパティ名:
[resharper_]csharp_space_before_typeof_parentheses, [resharper_]space_before_typeof_parentheses
可能な値:
真 | 偽
例:
真 |
|---|
Type t = typeof (bool);
|
false |
|---|
Type t = typeof(bool);
|
'default' 括弧
プロパティ名:
[resharper_]csharp_space_before_default_parentheses, [resharper_]space_before_default_parentheses
可能な値:
真 | 偽
例:
真 |
|---|
return default (int);
|
false |
|---|
return default(int);
|
'checked' および 'unchecked' の丸括弧
プロパティ名:
[resharper_]csharp_space_before_checked_parentheses, [resharper_]space_before_checked_parentheses
可能な値:
真 | 偽
例:
真 |
|---|
return checked (100000 * 10000) + unchecked (10000 * 10000);
|
false |
|---|
return checked(100000 * 10000) + unchecked(10000 * 10000);
|
'sizeof' 括弧
プロパティ名:
[resharper_]csharp_space_before_sizeof_parentheses, [resharper_]space_before_sizeof_parentheses
可能な値:
真 | 偽
例:
真 |
|---|
int size = sizeof (bool);
|
false |
|---|
int size = sizeof(bool);
|
'nameof' 括弧
プロパティ名:
[resharper_]csharp_space_before_nameof_parentheses, [resharper_]space_before_nameof_parentheses
可能な値:
真 | 偽
例:
真 |
|---|
return nameof (myField);
|
false |
|---|
return nameof(myField);
|
「新しい」括弧
プロパティ名:
[resharper_]csharp_space_before_new_parentheses, [resharper_]space_before_new_parentheses
可能な値:
真 | 偽
例:
真 |
|---|
List<int> x = new ();
|
false |
|---|
List<int> x = new();
|
キーワードと式の間
プロパティ名:
[resharper_]csharp_space_between_keyword_and_expression, [resharper_]space_between_keyword_and_expression
可能な値:
真 | 偽
例:
真 |
|---|
public SomeType A(object a)
{
return (SomeType)a ?? throw (new Exception());
}
|
false |
|---|
public SomeType A(object a)
{
return(SomeType)a ?? throw(new Exception());
}
|
キーワードとタイプの間
プロパティ名:
[resharper_]csharp_space_between_keyword_and_type, [resharper_]space_between_keyword_and_type
可能な値:
真 | 偽
例:
真 |
|---|
public (int, int) A(ref (int, int) a)
{
return a;
}
|
false |
|---|
public(int, int) A(ref(int, int) a)
{
return a;
}
|
ステートメントの括弧内
'if' の丸括弧
プロパティ名:
[resharper_]csharp_space_within_if_parentheses、 [resharper_] C# の制御フローステートメントの丸括弧内のスペース、 [resharper_]space_within_if_parentheses、 [resharper_]制御フローステートメントの丸括弧内のスペース
可能な値:
真 | 偽
例:
真 |
|---|
if ( condition )
{
foo();
}
|
false |
|---|
if (condition)
{
foo();
}
|
'while' の丸括弧
プロパティ名:
[resharper_]csharp_space_within_while_parentheses、 [resharper_] C# の制御フローステートメントの丸括弧内のスペース、 [resharper_]space_within_while_parentheses、 [resharper_]制御フローステートメントの丸括弧内のスペース
可能な値:
真 | 偽
例:
真 |
|---|
while ( condition )
{
do
{
foo();
} while ( condition );
}
|
false |
|---|
while (condition)
{
do
{
foo();
} while (condition);
}
|
'catch' の丸括弧
プロパティ名:
[resharper_]csharp_space_within_catch_parentheses、 [resharper_] C# の制御フローステートメントの丸括弧内のスペース、 [resharper_]space_within_catch_parentheses、 [resharper_]制御フローステートメントの丸括弧内のスペース
可能な値:
真 | 偽
例:
真 |
|---|
try
{
foo();
}
catch ( Exception e )
{
}
finally
{
}
|
false |
|---|
try
{
foo();
}
catch (Exception e)
{
}
finally
{
}
|
'switch' の丸括弧
プロパティ名:
[resharper_]csharp_space_within_switch_parentheses、 [resharper_] C# の制御フローステートメントの丸括弧内のスペース、 [resharper_]space_within_switch_parentheses、 [resharper_]制御フローステートメントの丸括弧内のスペース
可能な値:
真 | 偽
例:
真 |
|---|
switch ( expression )
{
default:
break;
}
|
false |
|---|
switch (expression)
{
default:
break;
}
|
'for' の丸括弧
プロパティ名:
[resharper_]csharp_space_within_for_parentheses、 [resharper_] C# の制御フローステートメントの丸括弧内のスペース、 [resharper_]space_within_for_parentheses、 [resharper_]制御フローステートメントの丸括弧内のスペース
可能な値:
真 | 偽
例:
真 |
|---|
for ( int i = 0; i < 10; i++ )
{
foo();
}
|
false |
|---|
for (int i = 0; i < 10; i++)
{
foo();
}
|
'foreach' の丸括弧
プロパティ名:
[resharper_]csharp_space_within_foreach_parentheses、 [resharper_] C# の制御フローステートメントの丸括弧内のスペース、 [resharper_]space_within_foreach_parentheses、 [resharper_]制御フローステートメントの丸括弧内のスペース
可能な値:
真 | 偽
例:
真 |
|---|
foreach ( object o in collection )
{
foo();
}
|
false |
|---|
foreach (object o in collection)
{
foo();
}
|
'using' 括弧
プロパティ名:
[resharper_]csharp_space_within_using_parentheses、 [resharper_] C# の制御フローステートメントの丸括弧内のスペース、 [resharper_]space_within_using_parentheses、 [resharper_]制御フローステートメントの丸括弧内のスペース
可能な値:
真 | 偽
例:
真 |
|---|
using ( C c = new C() )
{
foo();
}
|
false |
|---|
using (C c = new C())
{
foo();
}
|
'lock' 括弧
プロパティ名:
[resharper_]csharp_space_within_lock_parentheses、 [resharper_] C# の制御フローステートメントの丸括弧内のスペース、 [resharper_]space_within_lock_parentheses、 [resharper_]制御フローステートメントの丸括弧内のスペース
可能な値:
真 | 偽
例:
真 |
|---|
lock ( this )
{
foo();
}
|
false |
|---|
lock (this)
{
foo();
}
|
'fixed' 括弧
プロパティ名:
[resharper_]csharp_space_within_fixed_parentheses、 [resharper_] C# の制御フローステートメントの丸括弧内のスペース、 [resharper_]space_within_fixed_parentheses、 [resharper_]制御フローステートメントの丸括弧内のスペース
可能な値:
真 | 偽
例:
真 |
|---|
fixed ( int* fib = new int[1] )
{
foo();
}
|
false |
|---|
fixed (int* fib = new int[1])
{
foo();
}
|
他の括弧内
丸括弧
プロパティ名:
[resharper_]csharp_space_within_parentheses, [resharper_]丸括弧内のスペース
可能な値:
真 | 偽
例:
真 |
|---|
a = b * ( c + d );
|
false |
|---|
a = b * (c + d);
|
型キャストの丸括弧
プロパティ名:
[resharper_]csharp_space_between_typecast_parentheses, [resharper_]型キャスト丸括弧内のスペース
可能な値:
真 | 偽
例:
真 |
|---|
int a = ( int )b;
|
false |
|---|
int a = (int)b;
|
メソッド宣言の丸括弧
プロパティ名:
csharp_space_between_method_declaration_parameter_list_parentheses, [resharper_]メソッド宣言パラメーターリスト丸括弧内のスペース
可能な値:
真 | 偽
例:
真 |
|---|
class C
{
public abstract void Method1( string str );
public abstract void Method2();
}
|
false |
|---|
class C
{
public abstract void Method1(string str);
public abstract void Method2();
}
|
メソッド宣言の空の丸括弧
プロパティ名:
csharp_space_between_method_declaration_empty_parameter_list_parentheses, [resharper_]メソッド宣言空パラメーターリスト丸括弧内のスペース
可能な値:
真 | 偽
例:
真 |
|---|
class C
{
public abstract void Method1(string str);
public abstract void Method2( );
}
|
false |
|---|
class C
{
public abstract void Method1(string str);
public abstract void Method2();
}
|
メソッド呼び出しの丸括弧
プロパティ名:
csharp_space_between_method_call_parameter_list_parentheses, [resharper_]メソッド呼び出しパラメーターリスト丸括弧内のスペース
可能な値:
真 | 偽
例:
真 |
|---|
void Method()
{
foo1( "string", true );
foo2();
}
|
false |
|---|
void Method()
{
foo1("string", true);
foo2();
}
|
メソッド呼び出しの空の丸括弧
プロパティ名:
csharp_space_between_method_call_empty_parameter_list_parentheses, [resharper_]メソッド呼び出し空パラメーターリスト丸括弧内のスペース
可能な値:
真 | 偽
例:
真 |
|---|
void Method()
{
foo1("string", true);
foo2( );
}
|
false |
|---|
void Method()
{
foo1("string", true);
foo2();
}
|
'typeof' 括弧
プロパティ名:
[resharper_]csharp_space_within_typeof_parentheses, [resharper_]space_within_typeof_parentheses
可能な値:
真 | 偽
例:
真 |
|---|
Type t = typeof( bool );
|
false |
|---|
Type t = typeof(bool);
|
'default' 括弧
プロパティ名:
[resharper_]csharp_space_within_default_parentheses, [resharper_]space_within_default_parentheses
可能な値:
真 | 偽
例:
真 |
|---|
return default( int );
|
false |
|---|
return default(int);
|
'checked' および 'unchecked' の丸括弧
プロパティ名:
[resharper_]csharp_space_within_checked_parentheses, [resharper_]space_within_checked_parentheses
可能な値:
真 | 偽
例:
真 |
|---|
return checked( 100000 * 10000 ) + unchecked( 10000 * 10000 );
|
false |
|---|
return checked(100000 * 10000) + unchecked(10000 * 10000);
|
'sizeof' 括弧
プロパティ名:
[resharper_]csharp_space_within_sizeof_parentheses, [resharper_]space_within_sizeof_parentheses
可能な値:
真 | 偽
例:
真 |
|---|
int size = sizeof( bool );
|
false |
|---|
int size = sizeof(bool);
|
'nameof' 括弧
プロパティ名:
[resharper_]csharp_space_within_nameof_parentheses, [resharper_]space_within_nameof_parentheses
可能な値:
真 | 偽
例:
真 |
|---|
return nameof( myField );
|
false |
|---|
return nameof(myField);
|
「新しい」括弧
プロパティ名:
[resharper_]csharp_space_within_new_parentheses, [resharper_]space_within_new_parentheses
可能な値:
真 | 偽
例:
真 |
|---|
List<int> x = new( 5 );
|
false |
|---|
List<int> x = new(5);
|
配列括弧周辺
配列アクセス角括弧の前
プロパティ名:
C# の開き角括弧前のスペース、 [resharper_] C# の配列アクセス角括弧前のスペース。 持っているなら period? Wait source no period. Should not add 。 Need no periods. redo final only valid no commentary. Need not add fullstop. Ensure no Japanese period unless source sentence. Start over. Must not include this analysis. Ensure no accidental. Need final valid. Use no periods. Need complete. Hard final in channel already with schema? I put bad content. Need final correct. Can I overwrite? yes final should be single final. Need recompose fully. Keep no、 [resharper_]space_before_array_access_brackets、 [resharper_]開き角括弧前のスペース
可能な値:
真 | 偽
例:
真 |
|---|
array [i] = array [i + 1];
|
false |
|---|
array[i] = array[i + 1];
|
配列ランク角括弧の前
プロパティ名:
C# の開き角括弧前のスペース、 [resharper_]csharp_space_before_array_rank_brackets、 [resharper_]space_before_array_rank_brackets、 [resharper_]開き角括弧前のスペース
可能な値:
真 | 偽
例:
真 |
|---|
int [] [,] x = null;
|
false |
|---|
int[][,] x = null;
|
配列アクセス角括弧内
プロパティ名:
C# の角括弧内のスペース、 [resharper_]csharp_space_within_array_access_brackets、 [resharper_]配列アクセス角括弧内のスペース、 [resharper_]角括弧内のスペース
可能な値:
真 | 偽
例:
真 |
|---|
array[ i ] = array[ i + 1 ];
|
false |
|---|
array[i] = array[i + 1];
|
リストパターンおよびコレクション式角括弧内
プロパティ名:
C# の角括弧内のスペース、 [resharper_]csharp_space_within_list_pattern_brackets、 [resharper_]space_within_list_pattern_brackets、 [resharper_]角括弧内のスペース
可能な値:
真 | 偽
例:
真 |
|---|
int[] collection = [ 1, 2, 3 ];
var matches = collection is [ 1, > 0, not 42 ];
|
false |
|---|
int[] collection = [1, 2, 3];
var matches = collection is [1, > 0, not 42];
|
配列ランク角括弧内
プロパティ名:
C# の角括弧内のスペース、 [resharper_]csharp_space_within_array_rank_brackets、 [resharper_]space_within_array_rank_brackets、 [resharper_]角括弧内のスペース
可能な値:
真 | 偽
例:
真 |
|---|
int[ , ] x = new int[ 1, 2 ];
|
false |
|---|
int[,] x = new int[1, 2];
|
配列ランク空角括弧内
プロパティ名:
csharp_space_between_empty_square_brackets、 [resharper_]csharp_space_within_array_rank_empty_brackets、 [resharper_]space_within_array_rank_empty_brackets、 [resharper_]space_between_empty_square_brackets
可能な値:
真 | 偽
例:
真 |
|---|
int[ ][,] x = null;
|
false |
|---|
int[][,] x = null;
|
山括弧の周囲
型パラメーターリストの山括弧を開く前
プロパティ名:
[resharper_]csharp_space_before_type_parameter_angle, [resharper_]space_before_type_parameter_angle
可能な値:
真 | 偽
例:
真 |
|---|
class C <T1, T2>
{
}
|
false |
|---|
class C<T1, T2>
{
}
|
型引数リストの山括弧を開く前
プロパティ名:
[resharper_]csharp_space_before_type_argument_angle, [resharper_]space_before_type_argument_angle
可能な値:
真 | 偽
例:
真 |
|---|
foo <int>();
|
false |
|---|
foo<int>();
|
型パラメーター山括弧
プロパティ名:
[resharper_]csharp_space_within_type_parameter_angles, [resharper_]space_within_type_parameter_angles
可能な値:
真 | 偽
例:
真 |
|---|
class C< T1, T2 >
{
}
|
false |
|---|
class C<T1, T2>
{
}
|
型引数の山括弧
プロパティ名:
[resharper_]csharp_space_within_type_argument_angles, [resharper_]space_within_type_argument_angles
可能な値:
真 | 偽
例:
真 |
|---|
foo< int >();
|
false |
|---|
foo<int>();
|
中括弧の周囲
単一行アクセサーブロックの前
プロパティ名:
[resharper_]csharp_space_before_singleline_accessorholder, [resharper_]space_before_singleline_accessorholder
可能な値:
真 | 偽
例:
真 |
|---|
int Property { get; set; }
|
false |
|---|
int Property{ get; set; }
|
単一行アクセッサ内
プロパティ名:
[resharper_]csharp_space_in_singleline_accessorholder, [resharper_]space_in_singleline_accessorholder
可能な値:
真 | 偽
例:
真 |
|---|
int Property
{
get { return x; }
set { x = value; }
}
|
false |
|---|
int Property
{
get {return x;}
set {x = value;}
}
|
単一行のプロパティ/イベントのアクセサー間
プロパティ名:
[resharper_]csharp_space_between_accessors_in_singleline_property, [resharper_]space_between_accessors_in_singleline_property
可能な値:
真 | 偽
例:
真 |
|---|
int Property { get; set; }
|
false |
|---|
int Property { get;set; }
|
空の波括弧間の Space
プロパティ名:
[resharper_]csharp_space_within_empty_braces, [resharper_]space_within_empty_braces
可能な値:
真 | 偽
例:
真 |
|---|
class C { }
|
false |
|---|
class C {}
|
単一行メソッド内
プロパティ名:
[resharper_]csharp_space_in_singleline_method, [resharper_]space_in_singleline_method
可能な値:
真 | 偽
例:
真 |
|---|
void Foo() { DoSomething(); }
|
false |
|---|
void Foo() {DoSomething();}
|
単一行の匿名メソッド内
プロパティ名:
[resharper_]csharp_space_in_singleline_anonymous_method, [resharper_]space_in_singleline_anonymous_method
可能な値:
真 | 偽
例:
真 |
|---|
EventHandler e = delegate { return; };
|
false |
|---|
EventHandler e = delegate {return;};
|
単一行式の中括弧内
プロパティ名:
[resharper_]csharp_space_within_single_line_array_initializer_braces, [resharper_]space_within_single_line_array_initializer_braces
可能な値:
真 | 偽
例:
真 |
|---|
int[] x = new int[] { 0, 1, 2 };
|
false |
|---|
int[] x = new int[] {0, 1, 2};
|
二項演算子の周囲
代入演算子 (「=」や「+=」など)
プロパティ名:
[resharper_]csharp_space_around_assignment_op、 [resharper_] C# のバイナリ演算子の周囲のスペース、 [resharper_]space_around_assignment_op、 [resharper_]バイナリ演算子周囲のスペース
可能な値:
真 | 偽
例:
真 |
|---|
a += 1;
|
false |
|---|
a+=1;
|
論理演算子(&& | |)
プロパティ名:
[resharper_]csharp_space_around_logical_op、 [resharper_] C# のバイナリ演算子の周囲のスペース、 [resharper_]space_around_logical_op、 [resharper_]バイナリ演算子周囲のスペース
可能な値:
真 | 偽
例:
真 |
|---|
if (a && b || c)
{
}
|
false |
|---|
if (a&&b||c)
{
}
|
等価演算子 (==,!=)
プロパティ名:
[resharper_]csharp_space_around_equality_op、 [resharper_] C# のバイナリ演算子の周囲のスペース、 [resharper_]space_around_equality_op、 [resharper_]バイナリ演算子周囲のスペース
可能な値:
真 | 偽
例:
真 |
|---|
if (a == b)
{
}
|
false |
|---|
if (a==b)
{
}
|
比較演算子 (<、>、<=、>=)
プロパティ名:
[resharper_]csharp_space_around_relational_op、 [resharper_] C# のバイナリ演算子の周囲のスペース、 [resharper_]space_around_relational_op、 [resharper_]バイナリ演算子周囲のスペース
可能な値:
真 | 偽
例:
真 |
|---|
bool condition = a < b;
|
false |
|---|
bool condition = a<b;
|
ビット演算子(& | ,^)
プロパティ名:
[resharper_]csharp_space_around_bitwise_op、 [resharper_] C# のバイナリ演算子の周囲のスペース、 [resharper_]space_around_bitwise_op、 [resharper_]バイナリ演算子周囲のスペース
可能な値:
真 | 偽
例:
真 |
|---|
int a = b ^ c;
|
false |
|---|
int a = b^c;
|
加法演算子 (+,-)
プロパティ名:
[resharper_]csharp_space_around_additive_op、 [resharper_] C# のバイナリ演算子の周囲のスペース、 [resharper_]space_around_additive_op、 [resharper_]バイナリ演算子周囲のスペース
可能な値:
真 | 偽
例:
真 |
|---|
a = a + b - c;
|
false |
|---|
a = a+b-c;
|
乗法演算子 (*,/,%)
プロパティ名:
[resharper_]csharp_space_around_multiplicative_op、 [resharper_] C# のバイナリ演算子の周囲のスペース、 [resharper_]space_around_multiplicative_op、 [resharper_]バイナリ演算子周囲のスペース
可能な値:
真 | 偽
例:
真 |
|---|
a = a * b / c;
|
false |
|---|
a = a*b/c;
|
Shift 演算子 (<<、>>、>>>)
プロパティ名:
[resharper_]csharp_space_around_shift_op、 [resharper_] C# のバイナリ演算子の周囲のスペース、 [resharper_]space_around_shift_op、 [resharper_]バイナリ演算子周囲のスペース
可能な値:
真 | 偽
例:
真 |
|---|
x = x << 1;
|
false |
|---|
x = x<<1;
|
Null 合体演算子 (??)
プロパティ名:
[resharper_]csharp_space_around_nullcoalescing_op、 [resharper_] C# のバイナリ演算子の周囲のスペース、 [resharper_]space_around_nullcoalescing_op、 [resharper_]バイナリ演算子周囲のスペース
可能な値:
真 | 偽
例:
真 |
|---|
x = a ?? b;
|
false |
|---|
x = a??b;
|
安全でない矢印演算子 (->)
プロパティ名:
[resharper_]csharp_space_around_arrow_op、 [resharper_] C# のメンバーアクセス演算子の周囲のスペース、 [resharper_]space_around_arrow_op、 [resharper_]メンバーアクセス演算子周囲のスペース
可能な値:
真 | 偽
例:
真 |
|---|
int b = ptr -> x;
|
false |
|---|
int b = ptr->x;
|
単項演算子の後
論理否定演算子 (!)
プロパティ名:
[resharper_]csharp_space_after_logical_not_op、 [resharper_] C# の単項演算子の後のスペース、 [resharper_]space_after_logical_not_op、 [resharper_]単項演算子後のスペース
可能な値:
真 | 偽
例:
真 |
|---|
if (! x) return;
|
false |
|---|
if (!x) return;
|
単項負演算子 (-)
プロパティ名:
[resharper_]csharp_space_after_unary_minus_op、 [resharper_] C# の単項演算子の後のスペース、 [resharper_]space_after_unary_minus_op、 [resharper_]単項演算子後のスペース
可能な値:
真 | 偽
例:
真 |
|---|
int x = - 5;
|
false |
|---|
int x = -5;
|
単項正演算子 (+)
プロパティ名:
[resharper_]csharp_space_after_unary_plus_op、 [resharper_] C# の単項演算子の後のスペース、 [resharper_]space_after_unary_plus_op、 [resharper_]単項演算子後のスペース
可能な値:
真 | 偽
例:
真 |
|---|
int x = + 5;
|
false |
|---|
int x = +5;
|
安全でないアドレス演算子 (&)
プロパティ名:
[resharper_]csharp_space_after_ampersand_op、 [resharper_] C# の単項演算子の後のスペース、 [resharper_]space_after_ampersand_op、 [resharper_]単項演算子後のスペース
可能な値:
真 | 偽
例:
真 |
|---|
int* b = & x;
|
false |
|---|
int* b = &x;
|
安全でないアスタリスク演算子 (*)
プロパティ名:
[resharper_]csharp_space_after_asterik_op、 [resharper_] C# の単項演算子の後のスペース、 [resharper_]space_after_asterik_op、 [resharper_]単項演算子後のスペース
可能な値:
真 | 偽
例:
真 |
|---|
int p = * ptr;
|
false |
|---|
int p = *ptr;
|
++ と -- の前後
プロパティ名:
[resharper_]csharp_space_near_postfix_and_prefix_op, [resharper_]space_near_postfix_and_prefix_op
可能な値:
真 | 偽
例:
真 |
|---|
void Method(int p)
{
p ++;
-- p;
}
|
false |
|---|
void Method(int p)
{
p++;
--p;
}
|
三項演算子
'?' の前
プロパティ名:
[resharper_]csharp_space_before_ternary_quest、 [resharper_] C# の三項演算子の周囲のスペース、 [resharper_]三項演算子の疑問符前のスペース、 [resharper_] 三項演算子の周囲のスペース
可能な値:
真 | 偽
例:
真 |
|---|
bool b = condition ? expr1 : expr2;
|
false |
|---|
bool b = condition? expr1 : expr2;
|
'?' の後
プロパティ名:
[resharper_]csharp_space_after_ternary_quest、 [resharper_] C# の三項演算子の周囲のスペース、 [resharper_]三項演算子の疑問符後のスペース、 [resharper_] 三項演算子の周囲のスペース
可能な値:
真 | 偽
例:
真 |
|---|
bool b = condition ? expr1 : expr2;
|
false |
|---|
bool b = condition ?expr1 : expr2;
|
':' の前
プロパティ名:
[resharper_]csharp_space_before_ternary_colon、 [resharper_] C# の三項演算子の周囲のスペース、 [resharper_]三項演算子のコロン前のスペース、 [resharper_] 三項演算子の周囲のスペース
可能な値:
真 | 偽
例:
真 |
|---|
bool b = condition ? expr1 : expr2;
|
false |
|---|
bool b = condition ? expr1: expr2;
|
':' の後
プロパティ名:
[resharper_]csharp_space_after_ternary_colon、 [resharper_] C# の三項演算子の周囲のスペース、 [resharper_]三項演算子のコロン後のスペース、 [resharper_] 三項演算子の周囲のスペース
可能な値:
真 | 偽
例:
真 |
|---|
bool b = condition ? expr1 : expr2;
|
false |
|---|
bool b = condition ? expr1 :expr2;
|
コンマとセミコロンの周囲
コンマの前
プロパティ名:
C# のカンマ前のスペース, [resharper_]カンマ前のスペース
可能な値:
真 | 偽
例:
真 |
|---|
foo(a , b , c);
|
false |
|---|
foo(a, b, c);
|
コンマの後
プロパティ名:
C# のカンマ後のスペース, [resharper_]カンマ後のスペース
可能な値:
真 | 偽
例:
真 |
|---|
foo(a, b, c);
|
false |
|---|
foo(a,b,c);
|
'for' のセミコロンの前
プロパティ名:
csharp_space_before_semicolon_in_for_statement, [resharper_]for ステートメント内のセミコロン前のスペース
可能な値:
真 | 偽
例:
真 |
|---|
for (int i = 1 ; i < 10 ; i++)
{
}
|
false |
|---|
for (int i = 1; i < 10; i++)
{
}
|
'for' のセミコロンの後
プロパティ名:
csharp_space_after_semicolon_in_for_statement, [resharper_]for ステートメント内のセミコロン後のスペース
可能な値:
真 | 偽
例:
真 |
|---|
for (int i = 1; i < 10; i++)
{
}
|
false |
|---|
for (int i = 1;i < 10;i++)
{
}
|
セミコロンの前
プロパティ名:
[resharper_]csharp_space_before_semicolon, [resharper_]space_before_semicolon
可能な値:
真 | 偽
例:
真 |
|---|
a = b ;
|
false |
|---|
a = b;
|
コロンの周囲
基本型リストのコロンの前
プロパティ名:
csharp_space_before_colon_in_inheritance_clause, [resharper_]継承句内のコロン前のスペース
可能な値:
真 | 偽
例:
真 |
|---|
class Derived : BaseClass, Interface
{
}
|
false |
|---|
class Derived: BaseClass, Interface
{
}
|
基本型リストのコロンの後
プロパティ名:
csharp_space_after_colon_in_inheritance_clause, [resharper_]継承句内のコロン後のスペース
可能な値:
真 | 偽
例:
真 |
|---|
class Derived : BaseClass, Interface
{
}
|
false |
|---|
class Derived :BaseClass, Interface
{
}
|
型パラメーター制約コロンの前
プロパティ名:
[resharper_]csharp_space_before_type_parameter_constraint_colon, [resharper_]型パラメーター制約コロン前のスペース
可能な値:
真 | 偽
例:
真 |
|---|
class C<T1> where T1 : I
{
}
|
false |
|---|
class C<T1> where T1: I
{
}
|
型パラメーター制約コロンの後
プロパティ名:
[resharper_]csharp_space_after_type_parameter_constraint_colon, [resharper_]型パラメーター制約コロン後のスペース
可能な値:
真 | 偽
例:
真 |
|---|
class C<T1> where T1 : I
{
}
|
false |
|---|
class C<T1> where T1 :I
{
}
|
'case' ステートメントのコロンの前
プロパティ名:
[resharper_]csharp_space_before_colon_in_case, [resharper_]case 内のコロン前のスペース
可能な値:
真 | 偽
例:
真 |
|---|
switch (expr)
{
case 0 :
break;
}
|
false |
|---|
switch (expr)
{
case 0:
break;
}
|
'case' ステートメントのコロンの後
プロパティ名:
[resharper_]csharp_space_after_colon_in_case, [resharper_]case 内のコロン後のスペース
可能な値:
真 | 偽
例:
真 |
|---|
switch (expr)
{
case 0: return A;
case 1: return B;
}
|
false |
|---|
switch (expr)
{
case 0:return A;
case 1:return B;
}
|
他のコロンの前
プロパティ名:
[resharper_]csharp_space_before_attribute_colon、 [resharper_]csharp_space_before_colon、 [resharper_]space_before_attribute_colon、 [resharper_]space_before_colon
可能な値:
真 | 偽
例:
真 |
|---|
[return : Description("returns A")]
public A b()
{
Method(arg1 : 1, arg2 : 3);
var y = (tuple1 : 1, tuple2 : 2);
return null;
}
|
false |
|---|
[return: Description("returns A")]
public A b()
{
Method(arg1: 1, arg2: 3);
var y = (tuple1: 1, tuple2: 2);
return null;
}
|
他のコロンの後
プロパティ名:
[resharper_]csharp_space_after_attribute_colon、 [resharper_]csharp_space_after_colon、 [resharper_]space_after_attribute_colon、 [resharper_]space_after_colon
可能な値:
真 | 偽
例:
真 |
|---|
[return: Description("returns A")]
public A b()
{
Method(arg1: 1, arg2: 3);
var y = (tuple1: 1, tuple2: 2);
return null;
}
|
false |
|---|
[return:Description("returns A")]
public A b()
{
Method(arg1:1, arg2:3);
var y = (tuple1:1, tuple2:2);
return null;
}
|
属性
属性セクション間
プロパティ名:
[resharper_]csharp_space_between_attribute_sections, [resharper_]space_between_attribute_sections
可能な値:
真 | 偽
例:
真 |
|---|
void Method([NotNull] [ItemNotNull] IList<string> items);
|
false |
|---|
void Method([NotNull][ItemNotNull] IList<string> items);
|
属性角括弧内
プロパティ名:
C# の角括弧内のスペース、 [resharper_]csharp_space_within_attribute_brackets、 [resharper_]space_within_attribute_brackets、 [resharper_]角括弧内のスペース
可能な値:
真 | 偽
例:
真 |
|---|
[ Attr1, Attr2(true) ]
class C
{
}
|
false |
|---|
[Attr1, Attr2(true)]
class C
{
}
|
属性の後
プロパティ名:
[resharper_]csharp_space_after_attributes, [resharper_]space_after_attributes
可能な値:
真 | 偽
例:
真 |
|---|
void Method([NotNull] [ItemNotNull] IList<string> items);
|
false |
|---|
void Method([NotNull] [ItemNotNull]IList<string> items);
|
その他
型キャスト丸括弧の後
プロパティ名:
csharp_space_after_cast, [resharper_]キャスト後のスペース
可能な値:
真 | 偽
例:
真 |
|---|
int a = (int) b;
|
false |
|---|
int a = (int)b;
|
ドットの周囲
プロパティ名:
[resharper_]csharp_space_around_dot、 [resharper_] C# のメンバーアクセス演算子の周囲のスペース、 [resharper_]ドット周囲のスペース、 [resharper_]メンバーアクセス演算子周囲のスペース
可能な値:
真 | 偽
例:
真 |
|---|
a . b . foo();
|
false |
|---|
a.b.foo();
|
ラムダ矢印の周囲
プロパティ名:
[resharper_]csharp_space_around_lambda_arrow, [resharper_]space_around_lambda_arrow
可能な値:
真 | 偽
例:
真 |
|---|
Action a = x => x + 1;
|
false |
|---|
Action a = x=>x + 1;
|
安全でないポインター宣言の前
プロパティ名:
[resharper_]csharp_space_before_pointer_asterik_declaration, [resharper_]space_before_pointer_asterik_declaration
可能な値:
真 | 偽
例:
真 |
|---|
int * x;
|
false |
|---|
int* x;
|
null 許容マークの前
プロパティ名:
[resharper_]csharp_space_before_nullable_mark, [resharper_]space_before_nullable_mark
可能な値:
真 | 偽
例:
真 |
|---|
int ? i = null;
|
false |
|---|
int? i = null;
|
名前空間エイリアスディレクティブの '=' の周囲
プロパティ名:
[resharper_]csharp_space_around_alias_eq, [resharper_]エイリアスの等号周囲のスペース
可能な値:
真 | 偽
例:
真 |
|---|
using X = A.B;
|
false |
|---|
using X=A.B;
|
行末コメントの前
プロパティ名:
[resharper_]csharp_space_before_trailing_comment, [resharper_]行末コメント前のスペース
可能な値:
真 | 偽
例:
真 |
|---|
var x = 4; // x = 4
|
false |
|---|
var x = 4;// x = 4
|
演算子キーワードの後
プロパティ名:
[resharper_]csharp_space_after_operator_keyword, [resharper_]space_after_operator_keyword
可能な値:
真 | 偽
例:
真 |
|---|
public static bool operator ==(C x, C y)
{
}
|
false |
|---|
public static bool operator==(C x, C y)
{
}
|
スライスパターンの「..」の後
プロパティ名:
[resharper_]csharp_space_within_slice_pattern, [resharper_]space_within_slice_pattern
可能な値:
真 | 偽
例:
真 |
|---|
bool matches = sourceObject is [1, 2, .. var tail];
|
false |
|---|
bool matches = sourceObject is [1, 2, ..var tail];
|