title: Ref int question in C#
body: <p>Simply put, I am using a while loop to repeat a method, and each time the method is run the int "i" will increase by 1. Although I am having trouble calling the "NumberUp" method. error output is below.</p>
  
  <p><strong>Main method:</strong></p>
  
  <pre><code>while (true)
  {
      NumberUp(0);
  }
  </code></pre>
  
  <p><strong>NumberUp Method:</strong></p>
  
  <pre><code>public static void NumberUp(ref int i)
  {
      i++;
      System.Console.WriteLine(i);
  }
  </code></pre>
  
  <p>I keep getting the following error:</p>
  
  <blockquote>
    <blockquote>
      <p>The best overloaded method match for 'ConsoleApplication2.Program.NumberUp(ref int)' has some invalid arguments</p>
    </blockquote>
  </blockquote>