public double GetConvertedValDensity(double value, string from, string to)
        {
            UnitsReflectionHelper <UnitDensity> helper = new UnitsReflectionHelper <UnitDensity>();
            UnitDensity unitFrom = helper.GetUnit(from);
            UnitDensity unitTo   = helper.GetUnit(to);

            return(new Density(value, unitFrom).GetConvertedVal(unitTo));
        }
 public Density Convert(UnitDensity to)
 {
     base.Convert(to);
     return(this);
 }
 public Density(double val, UnitDensity unit) : base(val, unit)
 {
     CheckValueWithException(CheckValueCompareWithZero.LargerThanZero, "The density must be larger than zero");
 }