Rivi.cs 722 Bytes
Newer Older
M1888's avatar
M1888 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Lottokone.Model
{
    public class Rivi
    {
        public short[] Numerot { get; set; }
        public Rivi()
        {
            Numerot = new short[7];
        }

        public override bool Equals(object obj)
        {
            Rivi r = obj as Rivi;
            if (r == null)
                return false;

            if (r.Numerot.Equals(this.Numerot))
                return true;

            return false;
        }

        public override int GetHashCode()
        {
            return 521069651 + EqualityComparer<short[]>.Default.GetHashCode(Numerot);
        }
    }
}