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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think this is the setting you are looking for.
http://screencast.com/t/nEXMHo6KoDead 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.