ReSharper's formatting keeps placing string interpolations on different lines, such as:
$" whatever = {somethingelse}"
becomes:
$" whatever={
somethingelse
}"
Any idea which option this is?
Beginning with C# 10, you can use string interpolation to initialize a constant string. All expressions used for placeholders must be constant strings. In other words, every interpolation expression must be a string, and it must be a compile time constant.
C# string interpolation is used to format and manipulate strings. This feature was introduced in C# 6. Using string interpolation, we can use objects and expressions as a part of the string interpolation operation. C# string interpolation is a method of concatenating, formatting and manipulating strings.
"Wrap object and collection initializer" is the setting you're after. Set it to chop if long and then if it's still wrapping incorrectly you can modify the "Right Margin (columns)" number to a much larger value and it will stop the behavior. Though by expanding the columns resharper will stop wrapping anything with fewer characters on the line than the value you set so it may make other reformatting perform in an undesirable way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With