public bool Equals(Product other)
 {
     return
         ((object)other == null ||
          SKU == null ||
          other.SKU == null
   ? false
   : SKU.Equals(other.SKU));
 }
예제 #2
0
        /// <summary>
        /// Checks that this instance's SKU matches the given instance's SKU
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public override bool Equals(object obj)
        {
            if (obj == null || obj.GetType() != this.GetType())
            {
                return(false);
            }

            return(SKU.Equals(((CheckoutItem)obj).SKU));
        }
예제 #3
0
 public static bool IsSKU(string SKUToCompare)
 {
     return(SKU.Equals(SKUToCompare.ToUpper()));
 }