/// <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() => HashCode.Combine(HasValue.GetHashCode(), EqualityComparer <T> .Default.GetHashCode(_value));
/// <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() => HashUtilities.Combine(HasValue.GetHashCode(), Value?.GetHashCode() ?? 0);
public override int GetHashCode() { return(HasValue.GetHashCode() + value?.GetHashCode() ?? 0); }
public override int GetHashCode() => unchecked ( _value == null ? 0 : EqualityComparer <T> .Default.GetHashCode(_value) * 439 ^ HasValue.GetHashCode() );
public override int GetHashCode() { unchecked { return((HasValue.GetHashCode() * 397) ^ (_value?.GetHashCode() ?? 0)); } }