简体   繁体   中英

Fixing identation after and if statement Visual Studio 2019 programming in C#

After I type if (view=="") { and press Enter , VS formats and indents the curly braces to this:

 if (view == "")
            {

            }

How can I change the settings in Visual Studio 2019 to just have it like this

  if (view == "")
  {

  }

I've been looking and trying different combinations and can't seem to find the setting.

If you want to get the format you need, you can refer to the parameters of this option:

Tools>Options>Text Editor>C#>Code Style>Formatting>Indentation, uncheck the option ”Indent open and close braces”.

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM