/// <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 { int result = ErrorText.GetHashCode(); result = (result * 397) ^ Target.GetHashCode(); result = (result * 397); return(result); } }
public override int GetHashCode() { unchecked { var hashCode = PrePadding?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ (ValueFormat?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Padding?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (SymbolFormat?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (PostPadding?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (ErrorText?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ Unit.GetHashCode(); return(hashCode); } }