有时(但不总是!?)当我使用分号粘贴或结束一行时,Visual Studio将在if语句后添加一个空格!例如,粘贴时,这个
if()
Run Code Online (Sandbox Code Playgroud)
将变成这样:
if (condition)
Run Code Online (Sandbox Code Playgroud)
并且,当完成一行时,这个
if(condition)
DoSomething()
Run Code Online (Sandbox Code Playgroud)
将变成这样:
if (condition)
DoSomething();
Run Code Online (Sandbox Code Playgroud)
不得不经常删除这个空间(有时两次!)正在推动我绝对的Bonkers! 这似乎发生同if和while,但不会for.
我在VS选项中找不到与此相关的任何内容.我安装了Resharper,但设置为不自动添加空间:

为什么Visual Studio会惩罚我?