DateOnly Constructors

Definition

Overloads

DateOnly(Int32, Int32, Int32)

Creates a new instance of the DateOnly structure to the specified year, month, and day.

DateOnly(Int32, Int32, Int32, Calendar)

Creates a new instance of the DateOnly structure to the specified year, month, and day for the specified calendar.

DateOnly(Int32, Int32, Int32)

Source:
DateOnly.cs
Source:
DateOnly.cs
Source:
DateOnly.cs

Creates a new instance of the DateOnly structure to the specified year, month, and day.

public DateOnly (int year, int month, int day);

Parameters

year
Int32

The year (1 through 9999).

month
Int32

The month (1 through 12).

day
Int32

The day (1 through the number of days in month).

Applies to

.NET 9 и другие версии
Продукт Версии
.NET 6, 7, 8, 9

DateOnly(Int32, Int32, Int32, Calendar)

Source:
DateOnly.cs
Source:
DateOnly.cs
Source:
DateOnly.cs

Creates a new instance of the DateOnly structure to the specified year, month, and day for the specified calendar.

public DateOnly (int year, int month, int day, System.Globalization.Calendar calendar);

Parameters

year
Int32

The year (1 through the number of years in calendar).

month
Int32

The month (1 through the number of months in calendar).

day
Int32

The day (1 through the number of days in month).

calendar
Calendar

The calendar that is used to interpret year, month, and day.month.

Applies to

.NET 9 и другие версии
Продукт Версии
.NET 6, 7, 8, 9