在ReSharper中,我打开了“长换行”,并将所有“换行参数”选项设置为“长换行时截断”。
如果我有一行这样的代码:
DisplayMessage("This is a really long string that cuts off the screen ...", type, item);ReSharper想要这样设置行的格式:
DisplayMessage(
"This is a really long string that cuts off the screen ...",
type,
item);但我希望它像这样格式化:
DisplayMessage("This is a really long string that cuts off the screen ...",
type,
item);这个是可能的吗?我意识到这是因为作为第一个参数的字符串很长,所以它希望将它放在自己的行中,但我更喜欢截断的参数与左括号一致。
好像我需要一个[ ] Don't put the first parameter on its own line选项。
发布于 2016-10-11 21:19:41
您要查找的复选框位于以下位置:
Code editing -> C# -> Formatting Style -> Line Breaks and Wrapping -> Line Wrapping
并命名为
Prefer wrap after "(" in invocation
你想把它取下来
(但my Resharper将2016.2.2 build 13-2016显示为其版本)
https://stackoverflow.com/questions/38977840
复制相似问题