Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resharper force space after curly bracket and before closing bracket

Tags:

resharper

Resharper is giving me this:

new MyObject {Prop1 = prop1, Prop2 = prop2} 

But I want:

new MyObject { Prop1 = prop1, Prop2 = prop2 } 

Currently it's breaking my StyleCop rules.

like image 841
Tim Peel Avatar asked May 20 '11 00:05

Tim Peel


1 Answers

I think this is the setting you are looking for.

http://screencast.com/t/nEXMHo6Ko Dead link

--Edit--

In case of a dead link, The setting is under C# -> Formatting Style -> Spaces -> Within single-line initializer braces. Check the box next to it and you'll be all set.

like image 120
Brian Dishaw Avatar answered Sep 19 '22 12:09

Brian Dishaw