'Usage Dim months As Integer Dim precision As Byte Dim instance As New TdIntervalMonth(months, precision)
Parameters
- months
- Number of months.
- precision
- Number of significant digits of the month.
'Usage Dim months As Integer Dim precision As Byte Dim instance As New TdIntervalMonth(months, precision)
Exception | Description |
---|---|
ArgumentOutOfRangeException | The precision parameter is less than the TdIntervalMonth.MinPrecision or greater than the TdIntervalMonth.MaxPrecision range of values. |
OverflowException | The months parameter specifies a TdIntervalMonth value less than TdIntervalMonth.MinValue or greater than TdIntervalMonth.MaxValue. |
ArgumentException | The precision parameter is not large enough to represent the number of months. |
The allowable values of precision are from 1 - 4.
The number of months is evaluated against TdIntervalMonth.MinValue and and TdIntervalMonth.MaxValue to determine if the values are exceeded. If the values are not exceeded but the resulting months component exceeds the supplied precision value, an exception is generated.
For example, a month value of 99 and a precision of 1 will generate an exception. The TdIntervalMonth.Months interval component cannot be represented in 1 significant digit, thus resulting in an invalid TdIntervalMonth.
Negative months may be supplied to represent negative duration of time.
Target Platforms: Windows 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019