title: Transposition of matrix not working
body: <p>I am trying to transpose a int[,] matrix. But I do not get the correct output. I have done the transposition with two for-loops but I think I did a mistake there. I just can't point it out.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>int[,] matrix = new int[2,2];
  matrix[0, 0] = 1;
  matrix[0, 1] = 2;
  matrix[1, 0] = 3;
  matrix[1, 1] = 4;
  
  public void transponieren()
  {
      int[,] temp = this.matrix;
  
      for (int i = 0; i &lt; this.matrix.GetLength(0); i++)
      {
          for (int j = 0; j &lt; this.matrix.GetLength(1); j++)
          {
               this.matrix[i, j] = temp[j, i];
          }
      }
  
      transponiert = true;
  }
  </code></pre>
  
  <p>With an input of</p>
  
  <p>[ 1 , 2 ]<br>
  [ 3 , 4 ]</p>
  
  <p>I get an output of</p>
  
  <p>[ 1 , 3 ]<br>
  [ 3 , 4 ]</p>
  
  <p>I have already another solution that works but I want to know what I did wrong here as I only copied the working solution from somewhere else.</p>