public static Homework CreateHomework(string line)
        {
            string[] fields   = line.Split(','); // new char[] { ',' }
            Homework homework = new Homework()
            {
                id           = Convert.ToInt32(fields[0]),
                receivedWeek = Convert.ToInt32(fields[1]),
                deadlineWeek = Convert.ToInt32(fields[2]),
                description  = fields[2]
            };

            return(homework);
        }
Ejemplo n.º 2
0
        public override bool Equals(object obj)
        {
            Homework h = (Homework)obj;

            return(h.number == this.number);
        }