DateTimeWithZone Constructor (int, int, int, int, int, decimal, TimeZone?)DateTimeWithZone Constructor (Integer, Integer, Integer, Integer, Integer, Decimal, Nullable(Of TimeZone))DateTimeWithZone Constructor (int, int, int, int, int, decimal, Nullable<TimeZone>)
Initializes a new instance of the DateTimeWithZoneDateTimeWithZoneDateTimeWithZone structure
with the specified year, month, day, hour, minute, second and time zone components.
Syntax
Parameters
- year
Type: System.Int32System.Int32System::Int32
The year component.
- month
Type: System.Int32System.Int32System::Int32
The month component.
- day
Type: System.Int32System.Int32System::Int32
The day component.
- hour
Type: System.Int32System.Int32System::Int32
The hour component.
- minute
Type: System.Int32System.Int32System::Int32
The minute component.
- second
Type: System.DecimalSystem.DecimalSystem::Decimal
The second component.
- timeZone
Type: System.Nullable<T>System.Nullable(Of T)System::Nullable<T>
The time zone component (can be
null
a null reference (Nothing
in Visual Basic)nullptr
).
Exceptions
Exception | Condition |
ArgumentOutOfRangeExceptionArgumentOutOfRangeExceptionArgumentOutOfRangeException | year, month and day do not correspond to a valid date or hour, minute and day do not correspond to a valid time. |
OverflowExceptionOverflowExceptionOverflowException | An overflow error occurred. |