public override int GetHashCode() { int hashCode = 0; hashCode = hashCode ^ OrderID.GetHashCode() ^ ProductID.GetHashCode(); return(hashCode); }
public override int GetHashCode() { int hashProductID = ProductID.GetHashCode(); int hashSerialNumber = SerialNumber.GetHashCode(); return(hashProductID ^ hashSerialNumber); }
public override int GetHashCode() { int hash = 1; if (OrderID != 0) { hash ^= OrderID.GetHashCode(); } if (ProductID != 0) { hash ^= ProductID.GetHashCode(); } if (UnitPrice != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(UnitPrice); } if (Quantity != 0) { hash ^= Quantity.GetHashCode(); } if (Discount != 0F) { hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Discount); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hashCode = 683625434; hashCode = hashCode * -1521134295 + PharmacyID.GetHashCode(); hashCode = hashCode * -1521134295 + ProductID.GetHashCode(); return(hashCode); }
public override int GetHashCode() { int hashCode = 13; hashCode = (hashCode * 7) + OrderID.GetHashCode(); hashCode = (hashCode * 7) + ProductID.GetHashCode(); return(hashCode); }
public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + ProductID.GetHashCode(); return(hash); } }
public override int GetHashCode() { var hashCode = -2027619230; hashCode = hashCode * -1521134295 + ProductID.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ProductName); hashCode = hashCode * -1521134295 + ProductPrice.GetHashCode(); hashCode = hashCode * -1521134295 + ProductQuantity.GetHashCode(); return(hashCode); }
public override int GetHashCode() { if (OrderID == 0) { return(base.GetHashCode()); //transient instance } if (ProductID == 0) { return(base.GetHashCode()); //transient instance } return(OrderID.GetHashCode() ^ ProductID.GetHashCode()); }
public override int GetHashCode() { var hashCode = -931275965; hashCode = hashCode * -1521134295 + ProductID.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ProductName); hashCode = hashCode * -1521134295 + EqualityComparer <Supplier> .Default.GetHashCode(Supplier); hashCode = hashCode * -1521134295 + EqualityComparer <Category> .Default.GetHashCode(Category); hashCode = hashCode * -1521134295 + UnitsInStock.GetHashCode(); hashCode = hashCode * -1521134295 + UnitsOnOrder.GetHashCode(); hashCode = hashCode * -1521134295 + ReorderLevel.GetHashCode(); return(hashCode); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (ProductID != null) { hashCode = hashCode * 59 + ProductID.GetHashCode(); } if (Quantity != null) { hashCode = hashCode * 59 + Quantity.GetHashCode(); } return(hashCode); } }
/// <summary> /// Serves as a hash function for a particular type. /// </summary> /// <returns> /// A hash code for the current <see cref="T:System.Object"/>. /// </returns> /// <filterpriority>2</filterpriority> public override int GetHashCode() { unchecked { int result = BcdUsb.GetHashCode(); result = (result * 397) ^ Class.GetHashCode(); result = (result * 397) ^ SubClass.GetHashCode(); result = (result * 397) ^ Protocol.GetHashCode(); result = (result * 397) ^ MaxPacketSize0.GetHashCode(); result = (result * 397) ^ VendorID.GetHashCode(); result = (result * 397) ^ ProductID.GetHashCode(); result = (result * 397) ^ BcdDevice.GetHashCode(); result = (result * 397) ^ ManufacturerStringIndex.GetHashCode(); result = (result * 397) ^ ProductStringIndex.GetHashCode(); result = (result * 397) ^ SerialStringIndex.GetHashCode(); result = (result * 397) ^ ConfigurationCount.GetHashCode(); return(result); } }
public override int GetHashCode() => ProductID.GetHashCode();
public override int GetHashCode() { return(ProductID.GetHashCode()); }
public override int GetHashCode() { return(ProductID != null?ProductID.GetHashCode() : 0); }