Index: Ringtoets/Piping/src/Ringtoets.Piping.Primitives/PipingSoilLayer.cs =================================================================== diff -u -r5906f61fff270a7526253bea07dfecdf680898ed -rec27d9f02dc27c2829ed45788fae7d5923d63d3d --- Ringtoets/Piping/src/Ringtoets.Piping.Primitives/PipingSoilLayer.cs (.../PipingSoilLayer.cs) (revision 5906f61fff270a7526253bea07dfecdf680898ed) +++ Ringtoets/Piping/src/Ringtoets.Piping.Primitives/PipingSoilLayer.cs (.../PipingSoilLayer.cs) (revision ec27d9f02dc27c2829ed45788fae7d5923d63d3d) @@ -138,11 +138,8 @@ { return true; } - if (obj.GetType() != GetType()) - { - return false; - } - return Equals((PipingSoilLayer) obj); + var other = obj as PipingSoilLayer; + return other != null && Equals((PipingSoilLayer) obj); } public override int GetHashCode() @@ -176,7 +173,7 @@ && DiameterD70CoefficientOfVariation.Equals(other.DiameterD70CoefficientOfVariation) && PermeabilityMean.Equals(other.PermeabilityMean) && PermeabilityCoefficientOfVariation.Equals(other.PermeabilityCoefficientOfVariation) - && Color.Equals(other.Color); + && Color.ToArgb().Equals(other.Color.ToArgb()); } } } \ No newline at end of file