Note that there are some explanatory texts on larger screens.

plurals
  1. POcreate an array out of 2 List<double>
    primarykey
    data
    text
    <p><strong>UPDATE</strong> I tried Crazy's solution but now I have problem showing data in a foreach loop:</p> <pre><code> foreach(double data in ztr.GetCurveDataForTestType()) { richTextBox1.AppendText("Voltage" + data + " --------- "); richTextBox1.AppendText("Current" + data + "\r\n"); } </code></pre> <p>That code prints out something like:</p> <pre><code>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 </code></pre> <p>how should I fix it?</p> <p>Hi everyone,</p> <p>I have an xml file that contains Voltage and Current values for a curve. I want to draw this curve so that Voltage is X and Current as Y in the cartesian coordinate.</p> <p>I can get voltage and current values out of the XML file easily like the code below. But I want to know how can I return this values in a nice clean Array that I can use easily later.</p> <p>Here is my code:</p> <pre><code> public double[,] GetCurveDataForTestType() { List&lt;double&gt; voltage = new List&lt;double&gt;(); List&lt;double&gt; current = new List&lt;double&gt;(); XPathNodeIterator volt = nav.Select("some XPATH"); XPathNodeIterator curr = nav.Select("some XPATH"); foreach (XPathNavigator value in volt) { voltage.Add(Convert.ToDouble(value.Value)); } foreach (XPathNavigator value in curr) { current.Add(Convert.ToDouble(value.Value)); } return null; //How should I reurn a nice array to use for drawing a curve(Voltage as X and current as Y) } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload