Question about formatting collection and object initializers
Give this code as an example:
var distributors = new List<Distributor>
{
new Distributor {Name = "KBC"},
new Distributor {Name = "Dexia"},
new Distributor {Name = "Fortis"},
};
I have tried all kinds of settings for the line breaks, wrapping and so on to be able to format the code as above during a code cleanup but I am not able to find the correct settings. What I want basically is to be able to put simple object initializers in a single line but when I do this, this is the result:
var distributors = new List<Distributor> {new Distributor {Name = "KBC"}, new Distributor {Name = "Dexia"}, new Distributor {Name = "Fortis"},};
This off course depends on what your interpretation of a simple object/collection initializer is? With "Chop Always" enabled this is the result:
var distributors = new List<Distributor> {
new Distributor {
Name = "KBC"
},
new Distributor {
Name = "Dexia"
},
new Distributor {
Name = "Fortis"
},
};
Any ideas?
Please sign in to leave a comment.
+1
"Gabriel Lozano-Moran" <gabriel.lozanomoran@fluxys.net> wrote in message
news:29307369.74181255011747922.JavaMail.clearspace@app8.labs.intellij.net...
>
>
>
>
>
>
>
Hello Gabriel
Could you please export your code style settings (through ReSharper > Options > Languages > Common > Code Style Sharing) into an xml file and send it to andrew dot serebryansky at jetbrains dot com?
Andrey Serebryansky
Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"