title: C#: Passing generic arrays
body: <p>I am trying to write a method that checks, if a given x/y pair is a valid index for a 2nd array (eg check if <code>myArray[x,y]</code> is safe). </p>
  
  <p>I would like it to work with arrays of any type, which I feel should be possible because they all have the same GetUpperBounds(int d) method and I do not need to touch their contents. I have tried</p>
  
  <pre><code>bool validate(&lt;T&gt;[,] array, int x, int y){ ... }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>bool validate([,] array, int x, int y){ ... }
  </code></pre>
  
  <p>but that does not work. </p>
  
  <p>Should I just keep overloading this method as needed even though the method bodies will be identical character for character?</p>