title: matrix overload operator c#
body: <p>What I need is to overload Operator + in C# so I can sum 2 matrixes.</p>
  
  <p>What I have is this function:</p>
  
  <pre><code>public int[,] operator+(int[,] matriz1, int[,] matriz2)
      {
          int[,] retorno = new int[4, 4];
          for (int i = 0; i &lt; 4; i++)
          {
              for (int j = 0; j &lt; 4; j++)
              {
                  retorno[i, j] = matriz1[i, j] + matriz2[i, j];
              }
          }
          return retorno;
      }
  </code></pre>
  
  <p>When I do this for example (WT, W1, W2 are all int[4,4]):</p>
  
  <pre><code>WT = W1 + W2;
  </code></pre>
  
  <p>I get an error saying: 
  operator + cannot be applied to operands of type int[<em>,</em>] and int[<em>,</em>], what am I doing wrong and how can I solve it?</p>