csharp_wrap_chained_method_calls

Break a chain of three or more calls onto its own line per call once it does not fit. Curb's default behaviour either way; setting the key only makes it explicit.

Value Notes
chop_if_long

Default: chop_if_long

No known case where Curb's output is not a fixed point of dotnet format — see conformance.

Ini
max_line_length = 80
csharp_wrap_chained_method_calls = chop_if_long
C#
using System.Text;

namespace N;

public class Widget
{
    public string Build()
    {
        return new StringBuilder().Append("Hello").Append(", ").Append("World").Append("!").ToString();
    }
}
C#
using System.Text;

namespace N;

public class Widget
{
    public string Build()
    {
        return new StringBuilder()
            .Append("Hello")
            .Append(", ")
            .Append("World")
            .Append("!")
            .ToString();
    }
}