public override void CreateAnswers(System.IO.StreamReader reader) { while (!reader.EndOfStream) { int[] res = Array.ConvertAll(reader.ReadLine().Trim().Split(' '), costTemp => Convert.ToInt32(costTemp)); IceCreamParlorAnswer ans = new IceCreamParlorAnswer() { arr = res }; Answers.Add(ans); } }
public override Boolean Equals(Object obj) { IceCreamParlorAnswer Answer = obj as IceCreamParlorAnswer; if (Answer?.arr?.Length != arr?.Length) { return(false); } for (int i = 0; i < Answer.arr.Length; i++) { if (Answer.arr[i] != arr[i]) { return(false); } } return(true); }