I simply cant get braces to work correctly

Completed

Hey

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();

or

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();
}
0
1 comment

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.

 

0

Please sign in to leave a comment.