Prevent newline when assinging to var?
I have some code that looks liek this
var passwordErrorText = DoSomeWorkWith(Browser).ThenDoSomething()
.ThenDoSomething()
.ThenDoSomething()
.ThenDoSomething()
.ThenDoSomething();
And resahrper keeps formatting it like
var passwordErrorText =
DoSomeWorkWith(Browser)
.ThenDoSomething()
.ThenDoSomething()
.ThenDoSomething()
.ThenDoSomething()
.ThenDoSomething();
How can I prevent this newline creation?
Please sign in to leave a comment.
Could you please specify the following:
In my real example (not the contrived one I posted), the length of the first line of the initial string of
is 113 characters (including left margin)
Line wrapping is checked
Right margin column value is 140
If i do the following
Then the right column value (including all left leading whitespace) is only 124. I want everything to break after the second method invocation and align to the dots. Is that possible?
Thanks for the reply! Just forgot to ask about the status of ReSharper | Options | Code Editing | C# | Formatting Style | Line Breaks and Wrapping | Preserve existing formatting | Keep existing line breaks.