示例#1
0
        internal ItemLength(double value, ItemLengthUnitType type, bool validateParams)
        {
            if (validateParams)
            {
                if (double.IsNaN(value))
                {
                    throw new ArgumentException("");
                }

                if (double.IsInfinity(value))
                {
                    throw new ArgumentException("");
                }
            }

            _value = value;
            _type  = type;
        }
示例#2
0
 /// <summary>
 /// Initializes instance members of the <see cref="ItemLength"/> class.
 /// </summary>
 public ItemLength(double value, ItemLengthUnitType type)
     : this(value, type, true)
 {
 }