/// <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 { return(((_name != null ? _name.GetHashCode() : 0) * 397) ^ _rank.GetHashCode()); } }
/// <summary> /// Returns the hash code for this instance. /// </summary> /// <returns> /// A 32-bit signed integer that is the hash code for this instance. /// </returns> public override int GetHashCode() { unchecked { var result = (_guild != null ? _guild.GetHashCode() : 0); result = (result * 397) ^ _id; result = (result * 397) ^ (_name != null ? _name.GetHashCode() : 0); result = (result * 397) ^ _rank.GetHashCode(); return(result); } }