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

Public Sub New ( _
    year As Integer, _
    month As Integer, _
    day As Integer, _
    hour As Integer, _
    minute As Integer, _
    second As Decimal, _
    timeZone As Nullable(Of TimeZone) _
)
public DateTimeWithZone(
    int year,
    int month,
    int day,
    int hour,
    int minute,
    decimal second,
    Nullable<TimeZone> timeZone
)
public:
DateTimeWithZone(
    int year, 
    int month, 
    int day, 
    int hour, 
    int minute, 
    decimal second, 
    Nullable<TimeZone> timeZone
)
 

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

ExceptionCondition
ArgumentOutOfRangeExceptionArgumentOutOfRangeExceptionArgumentOutOfRangeException year, month and day do not correspond to a valid date or hour, minute and day do not correspond to a valid time.
OverflowExceptionOverflowExceptionOverflowExceptionAn overflow error occurred.