Example #1
0
        public override int GetHashCode()
        {
            // Get the hash code for the Name field if it is not null.
            int hashProductName = CUName == null ? 0 : CUName.GetHashCode();

            // Get the hash code for the Code field.
            int hashProductCode = CUCode.GetHashCode();

            // Calculate the hash code for the product.
            return(hashProductName ^ hashProductCode);
        }