title: How to iterate through two dimensional array
body: <p>I have two list that I convert them to a single two dimesnional array like this:</p>
  
  <pre><code>double[,] data = new double[voltage.Count(), 2];
  for (int i = 0; i &lt; voltage.Count(); i++)
  {
      data[i, 0] = voltage[i];
      data[i, 1] = current[i];
  }
  </code></pre>
  
  <p>Now I am trying to itterate through this array but what I get is same value for both voltage and current in each line:</p>
  
  <pre><code>foreach (double data in ztr.GetCurveDataForTestType()) //this will return my array
  {
      richTextBox1.AppendText("Voltage" + data + "    ---------    ");
      richTextBox1.AppendText("Current" + data + "\r\n");
  }
  </code></pre>
  
  <blockquote>
    <p>Voltage-0.175    ---------    Current-0.175<br>
    Voltage-9.930625E-06    ---------    Current-9.930625E-06<br>
    Voltage-0.171875    ---------    Current-0.171875<br>
    Voltage-9.53375E-06    ---------    Current-9.53375E-06<br>
    Voltage-0.16875    ---------    Current-0.16875  </p>
  </blockquote>
  
  <p>As you see in the first line both voltage and current are same value that is voltage, and on the second raw they are the same again but this time it is the current value. How can I fix this?</p>