private void ReadDataFromFileToScore(string inputFile, List<OriginalData> score) { using (var reader = new StreamReader(inputFile)) { string line; while ((line = reader.ReadLine()) != null) { if (Regex.IsMatch(line.Trim(), @"^\d+")) { var data = new List<string>(line.Split()); data.RemoveAll(String.IsNullOrEmpty); var originalData = new OriginalData(data[1], data[6], data[8]); score.Add(originalData); } } } }