Index: Ringtoets/Piping/src/Ringtoets.Piping.Primitives/PipingSoilProfile.cs =================================================================== diff -u -r669e99259a7cc575b5df2be2c0ea7105d9edcbcf -rec27d9f02dc27c2829ed45788fae7d5923d63d3d --- Ringtoets/Piping/src/Ringtoets.Piping.Primitives/PipingSoilProfile.cs (.../PipingSoilProfile.cs) (revision 669e99259a7cc575b5df2be2c0ea7105d9edcbcf) +++ Ringtoets/Piping/src/Ringtoets.Piping.Primitives/PipingSoilProfile.cs (.../PipingSoilProfile.cs) (revision ec27d9f02dc27c2829ed45788fae7d5923d63d3d) @@ -130,11 +130,8 @@ { return true; } - if (obj.GetType() != GetType()) - { - return false; - } - return Equals((PipingSoilProfile) obj); + var other = obj as PipingSoilProfile; + return other!= null && Equals((PipingSoilProfile)obj); } public override int GetHashCode() @@ -148,7 +145,7 @@ } hashCode = (hashCode * 397) ^ Bottom.GetHashCode(); hashCode = (hashCode * 397) ^ (Name?.GetHashCode() ?? 0); - hashCode = (hashCode * 397) ^ (int) SoilProfileType; + hashCode = (hashCode * 397) ^ (int)SoilProfileType; return hashCode; } }