I had a .csv file with many lines and 3 columns (separated by ';') with numbers, which I convert to double array[][]
Now I've added to more columns of numbers and get an error:
FormatException -> Input string was not in a correct format
I can't find whats wrong because files are identical (but with 2 more columns) My code:
OpenFileDialog fD = new OpenFileDialog();
fD.Title = "select";
fD.Filter = "csv files|*.csv";
fD.InitialDirectory = @"path here";
if (fD.ShowDialog() == DialogResult.OK)
MessageBox.Show(fD.FileName.ToString());
double[][] termom = File.ReadLines(fD.FileName)
.Select(l => l.Split(';')
.Select(n => double.Parse(n))
.ToArray())
.ToArray();
Edit Thanks for help with edit - not very used to commands here. Hope i added file right original improved