Braces layout for shorthand array initialiser

Code Editing > C# > Formatting Style > Braces Layout > Array and Object Initializer

I am using the option "At next line indented 2 (GNU Style)".

This works for the following Array Initialiser:

private static readonly string[] TestArray = new[]
                "a", "b", "c", "d"

However when I try to use the shorthand version of the array initialiser, Resharper does not use the same formatting:

private static readonly string[] TestArray = {
                                                         "a", "b", "c", "d"

How can I make Resharper format the shorthand version the same as the long version?

1 comment
Comment actions Permalink

Hello Tim
     This looks like a bug to me. I've logged it under and you're welcome to vote for it. Thank you!

Andrey Serebryansky

Senior Support Engineer

JetBrains, Inc

"Develop with pleasure!"


Please sign in to leave a comment.