title: How to store all ctor parameters in fields
body: <p>I'm learning C# and a thought came up when coding. Is it possible to automaticly store parameters from a constructor to the fields in a simple way without having to write <code>this.var = var</code> on every variable to store them?</p>
  
  <p>Example:</p>
  
  <pre><code>class MyClass
  {
      int var1;
      int var2;
      int var3;
      int var4;
      public MyClass(int var1, int var2, int var3, int var4){
          this.var1 = var1;
          this.var2 = var2;
          this.var3 = var3;
          this.var4 = var4;
      }
  }
  </code></pre>
  
  <p>Is there a way to avoid writing <code>this.varX = varX</code> and save all the variables to the fields if the names are the same?</p>