title: Changing a value type when it is passed to a method in C#
body: <p>Basic manuals on C# state that to change a value type when passed to another method you must use the <code>out</code> or <code>ref</code> keywords, etc.</p>
  
  <p>For example:</p>
  
  <pre><code>int Loop(int counter)
  {
     return(++counter);
  }
  
  void ClickIt ()
  {
      int count = 0;
      for (int c1 = 0; c1 &lt; 10; c1++) 
      {
          count = Loop(count);
          Console.Writeline(count);
      }
  }
  </code></pre>
  
  <p>Here, <code>ClickIt</code> outputs the following result: <code>1, 2, 3, 4, ... 10</code></p>
  
  <p>In the example, <code>count</code> (a value type), which is being passed from the method <code>ClickIt</code> to the method <code>Loop</code> <em>without</em> <code>out</code> or <code>ref</code>, is being changed in <code>Loop</code>. And <code>Loop</code> then returns <code>count</code> to the calling method <code>ClickIt</code> which picks up the change to <code>count</code>.</p>
  
  <p>So, my question is: When is a value type, when passed as an argument to another method, required to use <code>out</code> or <code>ref</code> so that the value can be changed?</p>