By doing something like this:
MyObject tmp = new MyObject(); tmp.Prop = "Hello";
ReSharper tells me, βUse an object initializer,β so I let it reformat the code, and I get something like this:
MyObject tmp = new MyObject { Prop = "Hello" };
However, I would like the first bracket to be on the second line, for example:
MyObject tmp = new MyObject { Prop = "Hello" };
But I canβt find anything for this. I have the setting "C # β Formatting Style β Braces Layout β Array and Object Initializer" set to "On the next line (BSD style)"
Could there be some other setting stopping this from preventing the formatting I want?
Edit:. If I manually format the code as I want, it will automatically reformat (in the wrong format) when I enter the half-word.
Joel
source share