Code format places cast on separate line Follow
I have expression that, upon code formatting, is placed on four lines:
double deltaX =
(double)
Math.Min(
deltaX, some_long_var_foo - some_long_var_bar);
I cant figure out the correct combination of settings to not have this broken up so much. Im looking to get something like this:
double deltaX = (double)Math.Min(
deltaX, some_long_var_foo - some_long_var_bar);
Can ReSharper do this?
Please sign in to leave a comment.
Hello,
Could you please attach your code style settings (exported through ReSharper
Andrey Serebryansky
Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Its attached. As you can see I have lowered the character limit to 50 in order to reproduce the problem in the following code:
That code, when formatted with the attached settings, places the cast on a separate line (what I currently get):
But I think three lines is well enough (what I want):
Last snippet is roughly what I'm trying to get. Or rather anything where the cast isn't given a dedicated line.
I'm running my own Code Cleanup profile which does nothing but format the code.
Attachment(s):
resharper_settings.xml