예제 #1
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 /// <returns>A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns>
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (int)OptionType;
         hashCode = (hashCode * 397) ^ BaseNotional.GetHashCode();
         hashCode = (hashCode * 397) ^ Strike.GetHashCode();
         hashCode = (hashCode * 397) ^ Maturity.GetHashCode();
         return(hashCode);
     }
 }
예제 #2
0
 /// <summary>
 /// Equalses the specified other.
 /// </summary>
 /// <param name="other">The other.</param>
 /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
 private bool Equals(OptionContract other)
 {
     return(OptionType == other.OptionType && BaseNotional.Equals(other.BaseNotional) && Strike.Equals(other.Strike) && Maturity.Equals(other.Maturity));
 }