Duration Constructor (int, int, int, int, int, decimal)Duration Constructor (Integer, Integer, Integer, Integer, Integer, Decimal)Duration Constructor (int, int, int, int, int, decimal)
Initializes a new instance of the DurationDurationDuration structure with the
specified year, month, day, hour, minute and second components.
Syntax
Parameters
- year
Type: System.Int32System.Int32System::Int32
The number of years.
- month
Type: System.Int32System.Int32System::Int32
The number of months.
- day
Type: System.Int32System.Int32System::Int32
The number of days.
- hour
Type: System.Int32System.Int32System::Int32
The number of hours.
- minute
Type: System.Int32System.Int32System::Int32
The number of minutes.
- second
Type: System.DecimalSystem.DecimalSystem::Decimal
The number of seconds.
Exceptions
Exception | Condition |
OverflowExceptionOverflowExceptionOverflowException | The duration components represent a duration less than MinValueMinValueMinValue or greater than MaxValueMaxValueMaxValue. |