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

Initializes a new instance of the GYearMonthGYearMonthGYearMonth structure with the specified year, month and optional time zone.

Syntax

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

Parameters

year

Type: System.Int64System.Int64System::Int64

The calendar year.

month

Type: System.Int32System.Int32System::Int32

The month of the year.

timeZone

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

The optional time zone.

Exceptions

ExceptionCondition
ArgumentOutOfRangeExceptionArgumentOutOfRangeExceptionArgumentOutOfRangeException month is outside the range 1 to 12, or year is outside the range MinYearMinYearMinYear to MaxYearMaxYearMaxYear or is zero.