csharp_preserve_single_line_blocks

Allow a block the author wrote on one line to stay on one line.

Value Notes
true
false

Default: true

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

Ini
csharp_preserve_single_line_blocks = true
C#
namespace N;

public class Widget
{
    public int X { get; set; }
    public string Name { get; set; } = "";
    public void Empty() { }
}
C#
namespace N;

public class Widget
{
    public int X { get; set; }
    public string Name { get; set; } = "";
    public void Empty() { }
}
Ini
csharp_preserve_single_line_blocks = false
C#
namespace N;

public class Widget
{
    public int X { get; set; }
    public string Name { get; set; } = "";
    public void Empty() { }
}
C#
namespace N;

public class Widget
{
    public int X
    {
        get; set;
    }
    public string Name
    {
        get; set;
    } = "";
    public void Empty()
    {
    }
}