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));
        }
 public static bool IsSKU(string SKUToCompare)
 {
     return(SKU.Equals(SKUToCompare.ToUpper()));
 }