public override statistics GetStatistics() { var result = new statistics(); for (var index = 0; index < grades.Count; index++) { result.Add(grades[index]); } return(result); }
public override statistics GetStatistics() { var result = new statistics(); using (var reader = File.OpenText($"{Name}.txt")) { var line = reader.ReadLine(); while (line != null) { var number = double.Parse(line); result.Add(number); line = reader.ReadLine(); } } return(result); }