public float GetAmount(IUnit <Q> unit) { if (unit is null) { throw new ArgumentNullException(nameof(unit)); } if (!unit.Quantity.Equals(default(Q))) { throw new ArgumentException("Unit is not the same quantity as measure"); } return(unit.AmountToUnit(StandardAmount)); }