Visual Studio 2015 花括号格式:If, Else If, Else

GTR*_*824 5 c# formatting visual-studio-2015

我最近升级到了 Visual Studio 2015(更新 1),并且已经按照我想要的方式配置了东西,但是我在格式化花括号方面遇到了一些麻烦!我假设第二个代码示例是更被接受的约定,但我似乎无法正确设置。我在这里做错了什么?

Visual Studio 目前正在像这样自动格式化我的代码,注意else {

    public static string Gender(string x)
    {
        if (x == "M")
        {
            return "Male";
        }
        else if (x == "F")
        {
            return "Female";
        }
        else {
            return "Unknown";
        }
    }
Run Code Online (Sandbox Code Playgroud)

我希望我的代码像这样自动格式化

    public static string Gender(string x)
    {
        if (x == "M")
        {
            return "Male";
        }
        else if (x == "F")
        {
            return "Female";
        }
        else
        {
            return "Unknown";
        }
    }
Run Code Online (Sandbox Code Playgroud)

Geo*_*rge 3

我有 Visual Studio 2015 Update 1 并将其设置为类似于第二个代码片段中的格式。

一个重要的设置是取消选中“将其他内容放在新行上”选项。

如果这还不够,我将发布包含所有设置的屏幕截图(https://i.stack.imgur.com/sdzTZ.jpg

在此输入图像描述