What inserts space inside empty curly braces block?

血红的双手。 提交于 2019-12-11 11:55:53

问题


  • 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!