code format issue about object initialization

Answered

like below line code:

effects = new Effects { Video = new VideoEffects { Muted = ps.IsAvMuted, Hidden = ps.IsHidden } };

after i press choose Code/Reformat Code, it became below

effects = new Effects {Video = new VideoEffects {Muted = ps.IsAvMuted, Hidden = ps.IsHidden}};

How can i keep the space? i did not find related setting in Settings/Editor, maybe i missed.

Windows 10/Rider 2017.1.2

 

Tks

3 comments
Comment actions Permalink

Hi! Go to "File | Settings | Editor | Code Style | C#", choose "Spaces" tab, scroll to "Other" section, and check "Within single-line initializer braces" option.

0
Comment actions Permalink

how i can do that now? there is no such option

0
Comment actions Permalink

Hi nikita maletin,

The "Within single-line initializer braces" option has moved to "Around Braces" section of "File | Settings | Editor | Code Style | C#" -> "Spaces"

0

Please sign in to leave a comment.