title: comparing two 2d arrays line by line
body: <p>I'm trying to write a code for comparing two 2d arrays.for each line of the first array if program can find a simple line in the second  array lines should return 0 else it should return 1.but i don't know why it does not work.please guide me.
  `</p>
  
  <p>int test = 0;</p>
  
  <pre><code>for (int i = 0, q = 0; i &lt; arr.m &amp;&amp; q &lt; arr.m; i++, q++)
  {
      for (int j = 0, w = 0; j &lt; arr.m &amp;&amp; w &lt; arr.m; j++, w++)
      {
          if (a[i, j] == b[q, w])
          { test = 0; }
          else
          {
              q++;
              w = 0;
              if (a[i, j] == b[q, w])
              { test = 0; }
              else 
                  test = 1;
  
          }
  
  
      }
  }
  if (test == 1)
  {
      MessageBox.Show("two graphs are different ");
  } `
  </code></pre>
  
  <p>arr.m is number of the elements of arrays  and I should remember that each line of both graphs are sorted before .
  I mean:</p>
  
  <p>{ { 1 },{ 7, 8 ,3}, { 3, 4 }, { 5, 6 }  }</p>
  
  <p>{ { 3, 4 },{ 1 }, { 5, 6 }, { 7, 8,3 } }
  how can i show that these two arrays have same elements although they don't have the same position.</p>