Constructor DateOnly
DateOnly(Int32, Int32, Int32)
Initializes a new instance of the DateOnly struct with the specified year, month, and day.
Declaration
public DateOnly(int year, int month, int day)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | year | The year (1 through 9999). |
System.Int32 | month | The month (1 through 12). |
System.Int32 | day | The day (1 through the number of days in |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException |
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Framework | 200.4 - 200.6 |
UWP | 200.4 - 200.6 |