Пример #1
0
        public override bool Equals(object obj)
        {
            //
            // See the full list of guidelines at
            //   http://go.microsoft.com/fwlink/?LinkID=85237
            // and also the guidance for operator== at
            //   http://go.microsoft.com/fwlink/?LinkId=85238
            //

            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }

            // safe because of the GetType check
            Produccion prod = (Produccion)obj;

            // use this pattern to compare reference members
            if (Izq.Equals(prod.Izq) && this.IgualParteDerecha(prod))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #2
0
 public override bool IsValid()
 {
     return(Izq != null && Der != null && Izq.IsValid() && Der.IsValid());
 }