Example #1
0
 /// <summary>
 ///     Determines whether two value margins are equal.
 /// </summary>
 /// <param name="obj">The value margin to compare with this one.</param>
 /// <returns>
 ///     A value indicating whether the two value margins are equal.
 /// </returns>
 public override bool Equals(object obj)
 {
     if (obj is ValueMargin)
     {
         var valueMargin = (ValueMargin)obj;
         return(Value.Equals(valueMargin.Value) && LowMargin.Equals(valueMargin.LowMargin) &&
                HighMargin.Equals(valueMargin.HighMargin));
     }
     return(false);
 }
Example #2
0
 /// <summary>
 ///     Returns the hash code of the value margin object.
 /// </summary>
 /// <returns>The hash code.</returns>
 public override int GetHashCode()
 {
     return(Value.GetHashCode() ^ LowMargin.GetHashCode() ^ HighMargin.GetHashCode());
 }