Loading

csharp_indent_switch_labels

Indent case labels inside their switch.

Value Notes
true
false

Default: true

csharp_indent_switch_labels = true
		
namespace N;

public class Widget
{
    public string Name(int code)
    {
        switch (code)
        {
        case 1:
            return "one";
        case 2:
        {
            var msg = "two";
            return msg;
        }
        default:
            return "other";
        }
    }
}
		
namespace N;

public class Widget
{
    public string Name(int code)
    {
        switch (code)
        {
            case 1:
                return "one";
            case 2:
                {
                    var msg = "two";
                    return msg;
                }
            default:
                return "other";
        }
    }
}
		
csharp_indent_switch_labels = false
		
namespace N;

public class Widget
{
    public string Name(int code)
    {
        switch (code)
        {
            case 1:
                return "one";
            case 2:
                {
                    var msg = "two";
                    return msg;
                }
            default:
                return "other";
        }
    }
}
		
namespace N;

public class Widget
{
    public string Name(int code)
    {
        switch (code)
        {
        case 1:
            return "one";
        case 2:
            {
                var msg = "two";
                return msg;
            }
        default:
            return "other";
        }
    }
}