Reputation: 1277
I have visual studio 2013, Resharper 8.1 and Stylecop.
I'm not sure what setting is doing this, but I can't seem to find it!?
I pristine visual studio 2013 will take something like this:
var tmp = new List<string> {"this"};
and make it into this (like I want):
var tmp = new List<string> { "this" };
This happens upon typing the semicolon.
Right now my setup will do the opposite, it get's rid of the spaces (although it then grey underlines the braces because this is a StyleCop violation.
Where's the setting to HAVE spaces there, I've tried to go through all the VS and Resharper settings!?
Thanks for any insights.
Upvotes: 4
Views: 480
Reputation: 66459
That's the default setting in my environment too (VS2012 / ReSharper 7).
You can change it in the ReSharper options:
Code Editing » C# » Formatting Style » Spaces » Within single-line initializer braces
Upvotes: 6