public List <List <string> > ReadValues() { List <List <string> > allLines = new List <List <string> >(); foreach (var file in FilePaths) { List <string> lines = File.ReadAllLines(file).ToList(); foreach (var line in lines) { // Ignore headers on every file except first file if (FilePaths.IndexOf(file) > 0 && lines.IndexOf(line) == 0) { continue; } allLines.Add(line.Split(',').ToList()); } } RawSamples = allLines; return(allLines); }