Пример #1
0
 /// <summary>
 ///     Object hash code
 /// </summary>
 /// <returns></returns>
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Independent.GetHashCode();
         hashCode = (hashCode * 397) ^ (Enzymes != null ? Enzymes.GetHashCode() : 0);
         return(hashCode);
     }
 }
Пример #2
0
 /// <summary>
 /// Serves as a hash function for a particular type. <see cref="M:System.Object.GetHashCode"></see> is suitable for use in hashing algorithms and data structures like a hash table.
 /// </summary>
 /// <returns>
 /// A hash code for the current <see cref="T:System.Object"></see>.
 /// </returns>
 public override int GetHashCode()
 {
     return((Dependent == null ? 0 : Dependent.GetHashCode()) ^ (Independent == null ? 0 : Independent.GetHashCode()));
 }