I simply cant get braces to work correctly



I am interested in making a rule "force braces" on rider (latest version)

This is what resharper does for my statements which i really dont like

if (result == null) return new BadRequestResult();


if (group.OwnersDelta != null && group.OwnersDelta.Count > 0)
for (var i = 0; i != group.OwnersDelta.Count; i++)
if (group.OwnersDelta[i].Removed == null)
owners.Add(new Owner {ad_id = group.OwnersDelta[i].Id});

I want to enforce this.
braces on everything

if (result == null) {
return new BadRequestResult();
1 comment
Comment actions Permalink

Hello Elm,

To get the desired behavior, you need to select "Enforce always" for needed statements in the "Braces" section on ReSharper | Options | Code Editing | C# | Syntax Style page.



Please sign in to leave a comment.