I have a list of Series for signals that are being imported from a file. I want to have all X values of each datapoint of every Series in one seperate list and be able to access them via a loop. I was thinking of creating an array of Lists.
Here is what I have tried so far.
List<double>[] datapointsX = new List<double>[Signals.Count];
int i=0;
foreach(var signal in Signals){
datapointsX[i] = new List<double>();
for(int j=0; j<signal.Points.Count; j++){
datapointsX[i].Add(signal.Points[j].XValue);
}
Console.Writeline(datapointsX[0][1]);
i++;
}
But I get an exception that the object is not set to an instance or an object. The error is at the Console.Writeline function.
>` ?
– Franck Jul 30 '21 at 12:11