0%

ReSharper: Fixing array and object initializer indentation

There are tons of options when it comes to configuring your coding style in ReSharper. Somehow I managed to screw the indentation of array and object initializers’ variables. This is what it looked like (I use At Next Line (BSD style) setting):

int[] array = new int[]
{
1, 2, 3
}

To fix this, go to Formatting Style -> Other, and set the Continuous line indent multiplier to 1 (mine was 0)

And now it’s back to normal:

int[] array = new int[]
{
1, 2, 3
}