'Usage Dim timeSpan As TimeSpan Dim precision As Byte Dim instance As New TdIntervalHourToMinute(timeSpan, precision)
Parameters
- timeSpan
- A TimeSpan to initialize TdIntervalHourToMinute.
- precision
- Number of significant digits of the hour.
'Usage Dim timeSpan As TimeSpan Dim precision As Byte Dim instance As New TdIntervalHourToMinute(timeSpan, precision)
Exception | Description |
---|---|
OverflowException | The timespan parameter specifies a TdIntervalHourToMinute value less than TdIntervalHourToMinute.MinValue or greater than TdIntervalHourToMinute.MaxValue. |
ArgumentOutOfRangeException | The precision parameter is outside the TdIntervalHourToMinute.MinPrecision or TdIntervalHourToMinute.MaxPrecision range of values. |
ArgumentException | The precision parameter is not large enough to represent the number of hours. |
The TimeSpan value is converted into a TdIntervalHourToMinute and evaluated against TdIntervalHourToMinute.MinValue and TdIntervalHourToMinute.MaxValue. If the values are not exceeded but the resulting hours component exceeds the supplied parameter precision value, an exception is generated.
After conversion of the TimeSpan value into a TdIntervalHourToMinute, any seconds or microseconds will be truncated. For example, a TimeSpan value created with a TimeSpan.Ticks value of 60201234567 results in a value of 0 days, 1 hours, 40 minutes and 20.1234567 seconds. The TdIntervalHourToMinute literal representation results in a TdIntervalHourToMinute value of '1:40'. The 20.1234567 seconds value is truncated.
Target Platforms: Windows 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019