Resharper - “拓宽范围”功能

时间:2009-08-09 10:51:10

标签: c# resharper

如何使用ReSharper扩展变量的应对?

从:

public class MyClass
{
   public void DoSomething() 
   { 
      string widenMe = null; // i want to widen this 
   } 
 }

为:

public class MyClass 
{
   string widenMe = null; 

   public void DoSomething() 
   {  
   } 
}

干杯,

取值

2 个答案:

答案 0 :(得分:3)

点击您的变量名称(widenMe)和Ctrl + R,Ctrl + F使其成为一个字段。

答案 1 :(得分:2)

介绍Field(ctrl + alt + D)