Another reason to love ReSharper

time to read 1 min | 195 words

I just had the following code:

public class Demo
{
   public Demo(string demo)
   {
   }
}

ReSharper noticed that I don't do anything with the contructor, and suggested to interduce and initialize a field. This is so useful.

public class Demo
{
   string demo;
   public Demo(string demo)
   {
        this.demo = demo;
   }
}

I also used the Extract Interface for the first time, which did exactly what I wanted (create a file named IClassName, put the resulting code and inherit from the interface). Sweat.