Braces layout for object initializer

Hello

I am using ReSharper 4 in Visual Studio 2008. I have the following piece of
code:

return new Account {
IsActive = true,
Password = "password",
UserName = "username",
};

Whatever I choose in the ReSharper options for the brace layout nothing is
changed. What I want is to have the braces on the next line. Is this
possible?

Regards

Gabriel Lozano-Moran

2 comments
Comment actions Permalink

I haven't introduced separate option for object initializer. The option for
array initializers is used here.

Please let me know if you need separate option

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Gabriel Lozano-Moran" <gabriel.lozano-moran@hotmail.com> wrote in message
news:fpblk5$rm5$1@is.intellij.net...

Hello

>

I am using ReSharper 4 in Visual Studio 2008. I have the following piece
of code:

>

return new Account {
IsActive = true,
Password = "password",
UserName = "username",
};

>

Whatever I choose in the ReSharper options for the brace layout nothing is
changed. What I want is to have the braces on the next line. Is this
possible?

>

Regards

>

Gabriel Lozano-Moran



0
Comment actions Permalink

But in the Options for Braces Layout it says "Array and object initializer", what exactly is meant with object initializer? Could be that I am wrong...
 
Gabriel Lozano-Moran
 
 
"Eugene Pasynkov (JetBrains)" <Eugene.Pasynkov@jetbrains.com> wrote in message news:fpdvsp$36h$1@is.intellij.net...
>I haven't introduced separate option for object initializer. The option for
> array initializers is used here.
>
> Please let me know if you need separate option
>
> --
> Eugene Pasynkov
> Developer
> JetBrains, Inc
> http://www.jetbrains.com
> "Develop with pleasure!"
> "Gabriel Lozano-Moran" <gabriel.lozano-moran@hotmail.com> wrote in message
> news:fpblk5$rm5$1@is.intellij.net...
>> Hello
>>
>> I am using ReSharper 4 in Visual Studio 2008. I have the following piece
>> of code:
>>
>> return new Account {
>>                                    IsActive = true,
>>                                    Password = "password",
>>                                    UserName = "username",
>>                                };
>>
>> Whatever I choose in the ReSharper options for the brace layout nothing is
>> changed. What I want is to have the braces on the next line. Is this
>> possible?
>>
>> Regards
>>
>> Gabriel Lozano-Moran
>
> ]]>



Attachment(s):
BracesLayout.jpg
0

Please sign in to leave a comment.