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!

GregorianCalendar.ToDateTime

Returns the date and time converted to a DateTime value.

[Visual Basic]
Overrides Public Function ToDateTime( _
   ByVal year As Integer, _
   ByVal month As Integer, _
   ByVal day As Integer, _
   ByVal hour As Integer, _
   ByVal minute As Integer, _
   ByVal second As Integer, _
   ByVal millisecond As Integer, _
   ByVal era As Integer _
) As DateTime
[C#]
public override DateTime ToDateTime(
   int year,
   int month,
   int day,
   int hour,
   int minute,
   int second,
   int millisecond,
   int era
);
[C++]
public: override DateTime ToDateTime(
   int year,
   int month,
   int day,
   int hour,
   int minute,
   int second,
   int millisecond,
   int era
);
[JScript]
public override function ToDateTime(
   year : int,
   month : int,
   day : int,
   hour : int,
   minute : int,
   second : int,
   millisecond : int,
   era : int
) : DateTime;

Parameters

year
The year.
month
The month.
day
The day.
hour
The hour.
minute
The minute.
second
The second.
millisecond
The milliseconds.
era
The era.

Return Value

Returns the constructed DateTime instance for the specified time.

Exceptions

Exception Type Condition
ArgumentException if provided with an invalid era value

See Also

GregorianCalendar Class | GregorianCalendar Members | System.Globalization Namespace