Index: Ringtoets/Piping/src/Ringtoets.Piping.Data/GeneralPipingInput.cs =================================================================== diff -u -r62449d45d8f5103efc40871efe09d8c6653e7c42 -r7d8579f17abe04611f9edd55afecb6b85605a04d --- Ringtoets/Piping/src/Ringtoets.Piping.Data/GeneralPipingInput.cs (.../GeneralPipingInput.cs) (revision 62449d45d8f5103efc40871efe09d8c6653e7c42) +++ Ringtoets/Piping/src/Ringtoets.Piping.Data/GeneralPipingInput.cs (.../GeneralPipingInput.cs) (revision 7d8579f17abe04611f9edd55afecb6b85605a04d) @@ -19,6 +19,9 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System; +using Ringtoets.Piping.Data.Properties; + namespace Ringtoets.Piping.Data { /// @@ -27,6 +30,8 @@ /// public class GeneralPipingInput { + private double waterVolumetricWeight; + /// /// Initializes a new instance of the class. /// @@ -51,8 +56,24 @@ /// Gets the volumetric weight of water. /// [kN/m³] /// - public double WaterVolumetricWeight { get; set; } + /// Thrown when value is set to double.NaN or a negative number. + public double WaterVolumetricWeight + { + get + { + return waterVolumetricWeight; + } + set + { + if (double.IsNaN(value) || value < 0) + { + throw new ArgumentException(Resources.GeneralPipingInput_WaterVolumetricWeight_must_be_positive_number); + } + waterVolumetricWeight = value; + } + } + #endregion #region Heave specific parameters