title: C# out parameter in extension method
body: <p>In an extension method, I am receiving an error that my 'out' parameter does not exist in the current context. I assume this means that extension methods cannot have 'out' parameters, but this is not specified in the documentation. I would appreciate it if someone could please clarify!</p>
  
  <pre><code>public static int customMax(this int[] data, out index)
  {
      int max = data[0];
      index = 0;
  
      for (int i = 1; i &lt; data.Length; i++) {
          if (data[i] &gt; max) {
              max = data[i];
          }
      }
  
      return max;
  }
  </code></pre>