c# – 如何强制ReSharper始终将第一个参数放在与方法相同的行上
发布时间:2020-12-15 22:34:56 所属栏目:百科 来源:网络整理
导读:在ReSharper中,我打开了“Wrap Long Lines”,并且所有“Wrap Parameters”选项设置为“Chop if long”. 如果我有这样一行代码: DisplayMessage("This is a really long string that cuts off the screen ...",type,item); ReSharper想要格式化这样的行: Di
在ReSharper中,我打开了“Wrap Long Lines”,并且所有“Wrap Parameters”选项设置为“Chop if long”.
如果我有这样一行代码: 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 ...",item); 但是我希望它像这样格式化: DisplayMessage("This is a really long string that cuts off the screen ...",item); 这可能吗?我意识到这是因为长字符串作为第一个参数,所以它想把它放在自己的行上,但我更喜欢切割参数与左括号一致. 这就像我需要一个[]不要把第一个参数放在它自己的行选项上. 解决方法
您要查找的复选框位于:
代码编辑 – > C# – >格式化样式 – >换行和换行 – >线包装 并命名 首选在“(”调用之后换行 而你想要它 (然而我的Resharper显示2016.2.2 build 13-Sept-2016作为其版本) (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |