csharp_style_expression_bodied_indexers
Convert eligible block-bodied indexers. IDE0026.
| Value | Notes |
|---|---|
false |
|
true |
|
when_on_single_line |
Default: false
csharp_style_expression_bodied_indexers = false
namespace N;
public class Widget
{
private int[] _data = new int[10];
public int this[int index]
{
get { return _data[index]; }
}
}
namespace N;
public class Widget
{
private int[] _data = new int[10];
public int this[int index] { get { return _data[index]; } }
}
csharp_style_expression_bodied_indexers = true
namespace N;
public class Widget
{
private int[] _data = new int[10];
public int this[int index] { get { return _data[index]; } }
}
namespace N;
public class Widget
{
private int[] _data = new int[10];
public int this[int index] { get { return _data[index]; } }
}
csharp_style_expression_bodied_indexers = when_on_single_line
namespace N;
public class Widget
{
private int[] _data = new int[10];
public int this[int index] { get { return _data[index]; } }
}
namespace N;
public class Widget
{
private int[] _data = new int[10];
public int this[int index] { get { return _data[index]; } }
}