Wou*_*r D 5 c# resharper replace
我想使用“使用模式搜索...”替换这部分代码:
public bool IsDbObjectsOK()
{
var result = 0;
result = usp_IsDbObjectsOK();
if (result == 0)
return true;
return false;
}
public bool UnlockWindow()
{
var result = 0;
result = usp_UnlockWindow();
if (result == 0)
return true;
return false;
}
Run Code Online (Sandbox Code Playgroud)
用。。。来代替:
public bool IsDbObjectsOK()
{
return usp_IsDbObjectsOK() == 0;
}
public bool UnlockWindow()
{
return usp_UnlockWindow() == 0;
}
Run Code Online (Sandbox Code Playgroud)
我试着用
var $result$ = 0;
$result$ = $usp_IsDbObjectsOK$();
if ($result$ == 0)
return true;
return false;
Run Code Online (Sandbox Code Playgroud)
这不起作用,因为在任何需要替换的代码中都找不到方法调用。
这该怎么做?
| 归档时间: |
|
| 查看次数: |
827 次 |
| 最近记录: |