英文:
Resharper concatenates strings when I do not want it to
问题
var result = DialogService.Confirm("Save Changes?", message,
"Save" + "Discard");
第二行应该是两个参数。我希望它是这样的
"Save", "Discard");
所以我把光标放在+
字符后面,然后按退格键。但是,Resharper不仅删除了+
,还将这两个字符串连接成一个参数。
var result = DialogService.Confirm("Save Changes?", message,
"SaveDiscard");
这不是我想要的。我只想让退格键删除+
符号。
有人知道是什么设置导致这种情况发生吗?我尝试关闭编辑器行为的所有设置,但它们都不会影响它。
我确定这是Resharper的问题,因为当我禁用它时,这种情况不再发生。
英文:
I am editing this code with Resharper enabled.
var result = DialogService.Confirm("Save Changes?", message,
"Save" + "Discard");
The second line is supposed to be two arguments. I want it to say this
"Save", "Discard");
So I put the cursor right after the +
character and hit backspace. And instead of just removing the +
, Resharper goes ahead and concatenates the two strings into one argument.
var result = DialogService.Confirm("Save Changes?", message,
"SaveDiscard");
This is not at all what I want. I just want the backspace to remove the +
symbol.
Does anyone have any idea what setting would cause this to happen? I tried turning off all the settings on Editor Behavior but none of them affected it.
I am certain it is Resharper because when I disable it, this not longer occurs.
答案1
得分: 0
R# 将在下一个版本中改进这种行为:
- 在字符串连接后执行撤销将提供额外的步骤,去除
+
字符。 - 一个新选项将允许完全禁用此输入辅助功能。
英文:
R# will improve this behavior in the next release:
- Undo after the strings get concatenated will provide an extra step with the
+
character removed. - A new option will allow disabling this typing assist altogether.
Please report issues with R# directly to the development team with "ReSharper | Help | Report a bug or submit feedback".
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论