问题
- Using Visual Studio 2015, editing
C#
code, typing two character sequence{}
. - 'Something' constantly inserts single space inside the block resulting in
{ }
, which might be pretty annoying for someone.
What is causing this behavior when all IntelliSense and Resharper formatting is disabled?
回答1:
Although not very intuitive and expected:
Smart
choice in Visual Studio menu item Tools/Options/Text Editor/C#/Tabs/Indenting
is causing this behavior. Changing it to Block
stops it...
回答2:
If you are using Resharper then go to Resharper->TemplateExplorer then you can edit however you want
来源:https://stackoverflow.com/questions/32501598/what-inserts-space-inside-empty-curly-braces-block