'Usage Dim days As Integer Dim precision As Byte Dim instance As New TdIntervalDay(days, precision)
Parameters
- days
- Number of days.
- precision
- Number of significant digits of the day.
'Usage Dim days As Integer Dim precision As Byte Dim instance As New TdIntervalDay(days, precision)
Exception | Description |
---|---|
OverflowException | The day parameter specifies a TdIntervalDay value less than TdIntervalDay.MinValue or greater than TdIntervalDay.MaxValue. |
ArgumentOutOfRangeException | The precision parameter is outside the TdIntervalDay.MinPrecision or TdIntervalDay.MaxPrecision range of values. |
ArgumentException | The precision parameter is not large enough to represent the number of days. |
The number of days is constructed into a TdIntervalDay and validated to determine if the TdIntervalDay.MinValue or the TdIntervalDay.MaxValue values have been exceeded. If the values are not exceeded but the resulting days component exceeds the supplied precision value, an exception is generated.
For example a constructor for TdIntervalDay(444, 2) requests 444 days with a precision of 2. The resulting days value cannot be represented in 2 digits, therefore an exception is generated, even though the MinValue and the MaxValue values have not been exceeded.
Negative constructor parameters may be supplied to represent negative durations of time.
Target Platforms: Windows 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019