for int readenCsvFields Length DataContainer Add new double HeaderCoun

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
for (int i = k; i < readenCsvFields.Length - 1; i++)
{
DataContainer.Add(new double[HeaderCount]);
DateTimeList.Add(Convert.ToDateTime(readenCsvFields[i + 1][0]));
for (int j = 0; j < HeaderCount; j++)
{
try
{
if (readenCsvFields[i + 1][j + 1] != "")
DataContainer[i - k][j] = Convert.ToDouble(readenCsvFields[i + 1][j + 1]);
else
DataContainer[i - k][j] = 0;
}
catch
{
DataContainer[i - k][j] = Double.NaN;
}
}
}