I have two list that I convert them to a single two dimesnional array like this:
double[,] data = new double[voltage.Count(), 2];
for (int i = 0; i < voltage.Count(); i++)
{
data[i, 0] = voltage[i];
data[i, 1] = current[i];
}
Now I am trying to itterate through this array but what I get is same value for both voltage and current in each line:
foreach (double data in ztr.GetCurveDataForTestType()) //this will return my array
{
richTextBox1.AppendText("Voltage" + data + " --------- ");
richTextBox1.AppendText("Current" + data + "\r\n");
}
Voltage-0.175 --------- Current-0.175
Voltage-9.930625E-06 --------- Current-9.930625E-06
Voltage-0.171875 --------- Current-0.171875
Voltage-9.53375E-06 --------- Current-9.53375E-06
Voltage-0.16875 --------- Current-0.16875
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?