示例#1
0
        public override bool Equals(object obj)
        {
            // If parameter is null return false.
            if (obj == null)
            {
                return false;
            }

            if (ReferenceEquals(this, obj))
            {
                return true;
            }

            // If parameter cannot be cast to ModuleIdentity return false.
            ShippingMethod other = obj as ShippingMethod;
            if (other == null)
            {
                return false;
            }
            // Return true if the fields match:
            return (ShipmentMethodCode.EqualsInvariant(other.ShipmentMethodCode)) && (OptionName.EqualsInvariant(other.OptionName));
        }
示例#2
0
 public bool HasSameMethod(ShippingMethod method)
 {
     // Return true if the fields match:
     return((ShipmentMethodCode.EqualsInvariant(method.ShipmentMethodCode)) && (ShipmentMethodOption.EqualsInvariant(method.OptionName)));
 }