'Usage Dim hours As Integer Dim minutes As Integer Dim instance As New TdIntervalHourToMinute(hours, minutes)
Parameters
- hours
- Number of hours.
- minutes
- Number of minutes.
'Usage Dim hours As Integer Dim minutes As Integer Dim instance As New TdIntervalHourToMinute(hours, minutes)
Exception | Description |
---|---|
OverflowException | The parameters specify a TdIntervalHourToMinute value less than TdIntervalHourToMinute.MinValue or greater than TdIntervalHourToMinute.MaxValue. |
The number of hours and minutes are constructed into a TdIntervalHourToMinute and evaluated against TdIntervalHourToMinute.MinValue and TdIntervalHourToMinute.MaxValue. The TdIntervalHourToMinute.Precision is then calculated from the number of digits contained within the interval hour component.
For example, 28 hours and 75 minutes is first constructed into a TdIntervalHourToMinute. The TdIntervalHourToMinute literal representation results in a TdIntervalHourToMinute value of 29 hours and 15 minutes within the range of less than or equal to MaxValue and greater than or equal to the MinValue. Precision is calculated to be a value of 2 representing two significant digits in the hour.
An hour value of 7000 and 200000 minutes is first converted into a TdIntervalHourToMinute. The TdIntervalHourToMinute literal representation results in a TdIntervalHourToMinute value of 10,333 hours and 20 minutes exceeding the maximum value of '9999 59'.
Negative constructor parameters may be supplied to represent negative durations of time. Mixed positive and negative constructor parameters are added together that result in a negative or positive TdIntervalHourToMinute. For instance, an hour value of 20 and a minute value of -4900 will result in a TdIntervalHourToMinute interval value of -'61:40' with a calculated precision value of 2.
Product | Versions | Platforms |
---|---|---|
.NET | 2.1, 3.1, 6 | Windows, Linux, MacOS |
.NET Framework | 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 | Windows |
.NET Standard | 2.0 | Windows, Linux, MacOS |