public override int GetHashCode() { unchecked { var hashCode = ProductId; hashCode = (hashCode * 397) ^ UnitPrice.GetHashCode(); hashCode = (hashCode * 397) ^ Quantity.GetHashCode(); hashCode = (hashCode * 397) ^ Discount.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = OrderId.GetHashCode(); hashCode = (hashCode * 397) ^ Count; hashCode = (hashCode * 397) ^ OrderDate.GetHashCode(); hashCode = (hashCode * 397) ^ UnitPrice.GetHashCode(); hashCode = (hashCode * 397) ^ (UserName != null ? UserName.GetHashCode() : 0); return(hashCode); } }
/// <summary> /// Serves as the default hash function. Implementation courtesy of Resharper /// </summary> /// <returns>An iteger representing the hash code of the given object</returns> public override int GetHashCode() { unchecked { var hashCode = Quantity; hashCode = (hashCode * 397) ^ (ItemDescription?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ UnitPrice.GetHashCode(); hashCode = (hashCode * 397) ^ TotalPrice.GetHashCode(); hashCode = (hashCode * 397) ^ Promotion.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = PurchaseOrderId; hashCode = (hashCode * 397) ^ RawMaterialId; hashCode = (hashCode * 397) ^ SupplierId; hashCode = (hashCode * 397) ^ UnitPrice.GetHashCode(); hashCode = (hashCode * 397) ^ Quantity.GetHashCode(); hashCode = (hashCode * 397) ^ (UnitOfMeasure != null ? UnitOfMeasure.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { unchecked { int result = OrderId; result = (result * 397) ^ ProductId; result = (result * 397) ^ (Order != null ? Order.GetHashCode() : 0); result = (result * 397) ^ (Product != null ? Product.GetHashCode() : 0); result = (result * 397) ^ UnitPrice.GetHashCode(); result = (result * 397) ^ Quantity.GetHashCode(); result = (result * 397) ^ Discount.GetHashCode(); return(result); } }
public override int GetHashCode() { unchecked { var hashCode = (Id != null ? Id.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (UnitPrice != null ? UnitPrice.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (UnitType != null ? UnitType.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Discount != null ? Discount.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Quantity != null ? Quantity.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = Id; hashCode = (hashCode * 397) ^ (ProductName != null ? ProductName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ SupplierId; hashCode = (hashCode * 397) ^ CategoryId; hashCode = (hashCode * 397) ^ (QuantityPerUnit != null ? QuantityPerUnit.GetHashCode() : 0); hashCode = (hashCode * 397) ^ UnitPrice.GetHashCode(); hashCode = (hashCode * 397) ^ UnitsInStock.GetHashCode(); hashCode = (hashCode * 397) ^ UnitsOnOrder.GetHashCode(); hashCode = (hashCode * 397) ^ ReorderLevel.GetHashCode(); hashCode = (hashCode * 397) ^ Discontinued.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + (CarrierTrackingNumber == null ? 0 : CarrierTrackingNumber.GetHashCode()); hash = hash * 23 + (LineTotal == default(decimal) ? 0 : LineTotal.GetHashCode()); hash = hash * 23 + (ModifiedDate == default(DateTime) ? 0 : ModifiedDate.GetHashCode()); hash = hash * 23 + (OrderQty == default(short) ? 0 : OrderQty.GetHashCode()); hash = hash * 23 + (ProductId == default(int) ? 0 : ProductId.GetHashCode()); hash = hash * 23 + (Rowguid == default(Guid) ? 0 : Rowguid.GetHashCode()); hash = hash * 23 + (SalesOrderId == default(int) ? 0 : SalesOrderId.GetHashCode()); hash = hash * 23 + (SpecialOfferId == default(int) ? 0 : SpecialOfferId.GetHashCode()); hash = hash * 23 + (UnitPrice == default(decimal) ? 0 : UnitPrice.GetHashCode()); hash = hash * 23 + (UnitPriceDiscount == default(decimal) ? 0 : UnitPriceDiscount.GetHashCode()); return(hash); } }
public override int GetHashCode() { int hash = 1; if (SKU.Length != 0) { hash ^= SKU.GetHashCode(); } if (UnitPrice != 0) { hash ^= UnitPrice.GetHashCode(); } if (Quantity != 0) { hash ^= Quantity.GetHashCode(); } return(hash); }
public override int GetHashCode() { return(Type.GetHashCode() ^ Description.GetHashCode() ^ UnitPrice.GetHashCode()); }