Prevent Visual Studio from adding break lines to case-switch statements

Is there a way to disable Visual Studio (2010) “Document Format” for formatting statements switch-caseas follows:

When I write my code like:

switch (value) {
    case "1": mode = Mode.One; break;
    case "2": mode = Mode.Two; break;
}

And then click Document Format, Visual Studio adds interrupt lines:

switch (value) {
    case "1":
        mode = Mode.One;
        break;
    case "2":
        mode = Mode.Two;
        break;
}

I looked through the VS Options formatting section, but I cannot find anything relevant.

Options> Formatting

(I do not have ReSharper installed)

+5
source share
1 answer

A parameter was found that caused this:

Options> Text Editor> C #> Formatting> Wrap> Leave statements and member declarations on the same lineshould be checked.

Options dialog

+1
source

All Articles