Get correct indentation in Resharper for object and array initializers

后端 未结 4 2141
无人及你
无人及你 2021-02-01 01:25

Right now resharper formats our code like this:

private readonly List folders = new List
                                        {
           


        
4条回答
  •  甜味超标
    2021-02-01 01:54

    I just had a fight with this today. Go to ReSharper\Options\Languages\C#\Formatting Style\Other

    Scroll to the bottom of the list and uncheck "Indent array, object, and collection initializer block"

    That did the trick for me.

提交回复
热议问题