title: Why member variable doesn't follow the recursion return rules?
body: <p>I'm using a recursion to calculate two variables. What confused me is when I define a variable out of the method as a member variable, it returns the value which is last assigned to the variable instead of the first assigned to the variable? Why does this happen? </p>
  
  <pre><code>class Program
  {
      int a = 3;
      static void Main(string[] args)
      {
          Program program = new Program();
          int result = program.Test();
          Console.WriteLine(result); // result = 0
          Console.ReadKey();
      }
  
      private int Test()
      {
          a--;
          if(a != 0)
          {
              Test();
          }
          return a;
      }
  }
  
  
  class Program
  {
      static void Main(string[] args)
      {
          Program program = new Program();
          int result = program.Test(3);
          Console.WriteLine(result); // result = 2
          Console.ReadKey();
      }
  
      private int Test(int a)
      {
          a--;
          if(a != 0)
          {
              Test();
          }
          return a;
      }
  }
  </code></pre>
  
  <p>I wonder how did this happen? Is there some other rules that influence the the recursion return order? To me, I think if only I don't use out or ref, it should be make a copy of the member variable for calculate. So is anyone could help me find the reason?
  Thanks a lot.</p>