Loading

csharp_new_line_before_else

Put else on its own line rather than joining it to the preceding brace.

Value Notes
true
false

Default: true

csharp_new_line_before_else = true
		
namespace N;

public class Widget
{
    public string Classify(int n)
    {
        if (n > 0) {
            return "positive";
        } else if (n < 0) {
            return "negative";
        } else {
            return "zero";
        }
    }
}
		
namespace N;

public class Widget
{
    public string Classify(int n)
    {
        if (n > 0)
        {
            return "positive";
        }
        else if (n < 0)
        {
            return "negative";
        }
        else
        {
            return "zero";
        }
    }
}
		
csharp_new_line_before_else = false
		
namespace N;

public class Widget
{
    public string Classify(int n)
    {
        if (n > 0)
        {
            return "positive";
        }
        else if (n < 0)
        {
            return "negative";
        }
        else
        {
            return "zero";
        }
    }
}
		
namespace N;

public class Widget
{
    public string Classify(int n)
    {
        if (n > 0)
        {
            return "positive";
        } else if (n < 0)
        {
            return "negative";
        } else
        {
            return "zero";
        }
    }
}