Skip to main content

Wrap initializer expressions

PropertyValue
IdRR0052
Applicable Syntaxinitializer
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