コード例 #1
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (this.GetType() != obj.GetType())
            {
                return(false);
            }

            Pilot other = (Pilot)obj;

            if (other.IdNumber == this.IdNumber)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #2
0
 public Flight()
 {
     Pilot    = new Pilot();
     Aircraft = new Aircraft();
 }