Beispiel #1
0
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hash = 17;
         // Suitable nullity checks etc, of course :)
         hash = hash * 23 + Width.GetHashCode();
         hash = hash * 23 + Height.GetHashCode();
         hash = hash * 23 + ColorCount.GetHashCode();
         hash = hash * 23 + ReservedByte.GetHashCode();
         hash = hash * 23 + Planes.GetHashCode();
         hash = hash * 23 + BitCount.GetHashCode();
         hash = hash * 23 + SizeInBytes.GetHashCode();
         hash = hash * 23 + FileOffset.GetHashCode();
         hash = hash * 23 + (SourceFileName == null ? 1 : SourceFileName.GetHashCode());
         hash = hash * 23 + SourceIndex.GetHashCode();
         return(hash);
     }
 }