예제 #1
0
 /// <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);
     }
 }
예제 #2
0
 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);
     }
 }