Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从resharper添加字符串文字_Resharper - Fatal编程技术网

从resharper添加字符串文字

从resharper添加字符串文字,resharper,Resharper,在下面的示例中,如何使用resharper 7将“UIIconUpBrush”转换为字符串常量 borderMain.SetResourceReference(Border.BorderBrushProperty, "UIIconUpBrush"); 这在coderush中很容易,但在resharper中我看不到简单的方法。 选择整个字符串(例如双击,或使用Ctrl+W(可能重复)) 选择引入字段…(使用其直接快捷方式(通常为Ctrl+R、Ctrl+F),或从弹出的重构此菜单(通常为Ctrl+

在下面的示例中,如何使用resharper 7将
“UIIconUpBrush”
转换为字符串常量

borderMain.SetResourceReference(Border.BorderBrushProperty, "UIIconUpBrush");
这在coderush中很容易,但在resharper中我看不到简单的方法。

  • 选择整个字符串(例如双击,或使用Ctrl+W(可能重复))
  • 选择
    引入字段…
    (使用其直接快捷方式(通常为Ctrl+R、Ctrl+F),或从弹出的重构此菜单(通常为Ctrl+Shift+R),或从
    重新精简|重构
  • 引入字段
    对话框中,选择
    引入常数
    单选按钮(并对默认值进行任何更改)
  • 选择下一步

您完成了。

无论我使用什么设置,唯一的方法是在整个带括号的单词高亮显示时按ctrl-r然后按f。@user1603573很好,已更新以指示应选择字符串。不过,我认为不需要在选择中使用分隔引号。