/// <summary> /// Serves as a hash function for a <see cref="KeywordsGlossary.Entry"/> object. /// </summary> /// <returns> /// A hash code for this instance that is suitable for use in hashing algorithms and data structures such as /// a hash table. /// </returns> public override int GetHashCode() { int result = ObjectX.GenerateHashCode( m_Definition.GetHashCode(), m_MainForm.GetHashCode(), (m_OtherForms == null ? 0 : m_OtherForms.Count).GetHashCode() ); if (m_OtherForms != null) { for (int i = 0; i < m_OtherForms.Count; ++i) { result = ObjectX.GenerateHashCode(result, m_OtherForms[i].GetHashCode()); } } return(result); }
/// <summary> /// Serves as a hash function for a <see cref="KeywordsGlossary.Entry"/> object. /// </summary> /// <returns> /// A hash code for this instance that is suitable for use in hashing algorithms and data structures such as /// a hash table. /// </returns> public override int GetHashCode() { return(ObjectX.GenerateHashCode( m_Definition.GetHashCode(), m_MainForm.GetHashCode(), ObjectX.GenerateHashCode(m_OtherForms) )); }