Visual Studio/ReSharper code formatting - C#

From my most popular answer here:

  1. In Braces Layout, set Array and object initializer to At Next line (BSD Style).
  2. In Other, make sure that Continuous line indent multiplier is set to 1.
  3. In Other, make sure that Indent array, object and collection initializer block is unchecked.

You will have the style that you want!


You will find this in Resharper options. Go to ReSharper -> Options -> C# -> Formatting Style -> Braces Layout -> "Array And Object Initialization". But I am not sure if ReSharper allows such formatting.