Wrap initializer expressions
Property | Value |
---|---|
Id | RR0052 |
Applicable Syntax | initializer |
Enabled by Default | ✓ |
Usage
Example #1
before.cs
var x = new string[] { "a", "b", "c" }
after.cs
var x = new string[]
{
"a",
"b",
"c"
}
Example #2
before.cs
var x = new string[]
{
"a",
"b",
"c"
}
after.cs
var x = new string[] { "a", "b", "c" }
Configuration
roslynator_refactoring.wrap_initializer_expressions.enabled = true|false