csharp_preserve_single_line_statements
Allow a control-flow body the author left on its header's line to stay there. Chained using statements are the exception and take their own lines unless this key is written out and set to true.
| Value | Notes |
|---|---|
true |
|
false |
Default: true
No known case where Curb's output is not a fixed point of dotnet format — see conformance.
csharp_preserve_single_line_statements = true
namespace N;
public class Widget
{
public int Clamp(int n)
{
if (n < 0) return 0;
if (n > 100) return 100;
return n;
}
}
namespace N;
public class Widget
{
public int Clamp(int n)
{
if (n < 0) return 0;
if (n > 100) return 100;
return n;
}
}
csharp_preserve_single_line_statements = false
namespace N;
public class Widget
{
public int Clamp(int n)
{
if (n < 0) return 0;
if (n > 100) return 100;
return n;
}
}
namespace N;
public class Widget
{
public int Clamp(int n)
{
if (n < 0)
return 0;
if (n > 100)
return 100;
return n;
}
}