FROM#
- From the Tools menu, select Options
- Click Show all settings (checkbox at bottom left) (Show all settings in VS 2010)
- Text editor
- FROM#
- Formatting
- New lines
And check if you want new lines with brackets
Css:
almost the same but fewer options
- From the Tools menu, select Options
- Click Show all settings (checkbox at bottom left) (Show all settings in VS 2010)
- Text editor
- CSS
- Format
And how do you choose the desired formatting (in your case, the second switch)
For Visual Studio 2015:
Tools → Options
In the sidebar, go to Text Editor → C # → Formatting → Newlines
and uncheck each box under "New line options for curly braces"

Stormenet Sep 02 '08 at 13:55 2008-09-02 13:55
source share