title: C# referencing a methods variables from another method
body: <p>Sometimes it happens that I want to use a lot of Method As variables in Method B.
  Usually its quite a pain to pass all the variables to this method, especially if I have to do this a lot of times (but cannot simply copy paste, because some things change) or am just to lazy.</p>
  
  <p>Is there such a thing like a "inner Method"? Or some concept to handle this in an easy way?</p>
  
  <p>What I want to do:</p>
  
  <pre><code>    public void A()
      {
          int a = 4;
          string b = "Hello World";
  
          B(ref vals);
  
          //Or like so
          C(ref current);
      }
  
      public void B(ref AllValues)
      {
          a = 3;
          ...
      }
  
      public void C(ref MethodThatSharesAllValues method)
      {
          method.a = 3;
          ...
      }
  </code></pre>