DateOnly Constructors
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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. |
- 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);
public DateOnly (int year, int month, int day);
new DateOnly : int * int * int -> DateOnly
Public Sub New (year As Integer, month As Integer, day As Integer)
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 |
- 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);
public DateOnly (int year, int month, int day, System.Globalization.Calendar calendar);
new DateOnly : int * int * int * System.Globalization.Calendar -> DateOnly
Public Sub New (year As Integer, month As Integer, day As Integer, calendar As 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 |
Отзыв о .NET
.NET — это проект с открытым исходным кодом. Выберите ссылку, чтобы оставить отзыв: