Mono Class Library: System.DateTime Overview | Members

System.DateTime Constructor

Constructs and initializes a new instance of the DateTime structure with a specified year, month, and day. [Edit]

public DateTime (int year, int month, int day)

Parameters

year
A int containing the year (1 through 9999). [Edit]
month
A int containing the month (1 through 12). [Edit]
day
A int containing the day (1 through the number of days in month). [Edit]

Exceptions

TypeReason
ArgumentOutOfRangeException

year is less than 1 or greater than 9999

-or-

month is less than 1 or greater than 12

-or-

day is less than 1 or greater than the number of days in month

[Edit]

Remarks

The time of day for the resulting DateTime is midnight (00:00:00). [Edit]

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0