I have a lot of data stored in multiple arrays that I would like to get a value from but I'm having trouble. The identifier arrays are
String[] seqNum2 = new String[600];
String[] seqNum = new String[600];
I want to be able to find the match data in those arrays and get information that aligns with the data in these arrays
String[] netOil2 = new String[600];
String[] netOil = new String[600];
So here is my code so far but it is not outputting the correct answer that I want, all it is outputting is an infinite loop that says "System.String[], NaN".
private void netOilRadBtn_CheckedChanged(object sender, EventArgs e)
{
StreamWriter sw = new StreamWriter("test.txt"); //testing purposes only
//StreamReader sr = new StreamReader("OUTPUT.CSV");
double first;
double second;
for (int i = 0; i < netOil2.Length; i++)
{
for (int j = 0; j < netOil.Length; j++)
{
if (seqNum2[i] == seqNum[j])
{
//sw.WriteLine("Find New Seq Num");
first = Convert.ToDouble(netOil2[i]);
second = Convert.ToDouble(netOil[j]);
double answer = (first - second) / first;
sw.WriteLine("{0}, {1}", seqNum2, answer);
}
}
}
}
All I want to be able to do is output the matching seqNum and then the double answer. Any help would be greatly appreciated.
sw.WriteLine("{0}, {1}", seqNum2[i], answer);