DateWithZone Constructor (long, int, int, TimeZone?)DateWithZone Constructor (Long, Integer, Integer, Nullable(Of TimeZone))DateWithZone Constructor (long, int, int, Nullable<TimeZone>)

Initializes a new instance of the DateWithZoneDateWithZoneDateWithZone structure with the specified year, month, day and time zone components.

Syntax

Public Sub New ( _
    year As Long, _
    month As Integer, _
    day As Integer, _
    timeZone As Nullable(Of TimeZone) _
)
public DateWithZone(
    long year,
    int month,
    int day,
    Nullable<TimeZone> timeZone
)
public:
DateWithZone(
    long year, 
    int month, 
    int day, 
    Nullable<TimeZone> timeZone
)
 

Parameters

year

Type: System.Int64System.Int64System::Int64

The year component.

month

Type: System.Int32System.Int32System::Int32

The month component.

day

Type: System.Int32System.Int32System::Int32

The day component.

timeZone

Type: System.Nullable<T>System.Nullable(Of T)System::Nullable<T>

The time zone (can be null a null reference (Nothing in Visual Basic) nullptr).

Exceptions

ExceptionCondition
ArgumentOutOfRangeExceptionArgumentOutOfRangeExceptionArgumentOutOfRangeException year is 0, month is not between 1 and 12 or day does not correspond to a valid day in the specified month.
OverflowExceptionOverflowExceptionOverflowExceptionAn overflow error occurred.