Beispiel #1
0
        public override statistics Getstat()
        {
            var result = new statistics();

            for (var index = 0; index < grades.Count; index++)
            {
                result.add(grades[index]);
            }

            return(result);
        }
Beispiel #2
0
        public override statistics Getstat()
        {
            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);
        }