NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DateTime Constructor (Int32, Int32, Int32)

Initializes a new instance of the DateTime class to a specified year, month, and day.

[Visual Basic]
Overloads Public Sub New( _
   ByVal year As Integer, _
   ByVal month As Integer, _
   ByVal day As Integer _
)
[C#]
public DateTime(
   int year,
   int month,
   int day
);
[C++]
public: DateTime(
   int year,
   int month,
   int day
);
[JScript]
public function DateTime(
   year : int,
   month : int,
   day : int
);

Parameters

year
The year (1 through 9999).
month
The month (1 through 12).
day
The day (1 through 31).

Exceptions

Exception Type Condition
ArgumentException If the year is less than 1 or greater than 9999.
ArgumentException If the month is less than 1 or greater than 12.
ArgumentException If the day is less than 1 or greater than the number of days in the specified month.

Remarks

This DateTime class initializes a new instance of the DateTime to a specified year, month, and day. The time of day of the resulting DateTime is always midnight.

See Also

DateTime Structure | DateTime Members | System Namespace | DateTime Constructor Overload List | Int32