EastAsianLunisolarCalendar.ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32) 方法

定义

返回设置为指定的日期、时间和纪元的 DateTimeReturns a DateTime that is set to the specified date, time, and era.

public:
 override DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era);
public override DateTime ToDateTime (int year, int month, int day, int hour, int minute, int second, int millisecond, int era);
override this.ToDateTime : int * int * int * int * int * int * int * int -> DateTime
Public Overrides Function ToDateTime (year As Integer, month As Integer, day As Integer, hour As Integer, minute As Integer, second As Integer, millisecond As Integer, era As Integer) As DateTime

参数

year
Int32

一个整数,用于表示年份。An integer that represents the year.

month
Int32

1 到 13 之间的一个整数,用于表示月。An integer from 1 through 13 that represents the month.

day
Int32

1 到 31 之间的一个整数,用于表示日。An integer from 1 through 31 that represents the day.

hour
Int32

0 到 23 之间的一个整数,用于表示小时。An integer from 0 through 23 that represents the hour.

minute
Int32

0 到 59 之间的一个整数,用于表示分钟。An integer from 0 through 59 that represents the minute.

second
Int32

0 到 59 之间的一个整数,用于表示秒。An integer from 0 through 59 that represents the second.

millisecond
Int32

0 到 999 之间的一个整数,用于表示毫秒。An integer from 0 through 999 that represents the millisecond.

era
Int32

一个整数,用于表示纪元。An integer that represents the era.

返回

一个设置为指定的日期、时间和纪元的 DateTimeA DateTime that is set to the specified date, time, and era.

异常

yearmonthdayhourminutesecondmillisecondera 超出了此日历支持的范围。year, month, day, hour, minute, second, millisecond, or era is outside the range supported by this calendar.

注解

ToDateTime方法可以将当前日历中的任何日期转换为公历日期。The ToDateTime method can convert any date in the current calendar to a Gregorian calendar date. 以后可以使用公历日期来比较不同日历中的日期或在特定日历中创建等效日期。The Gregorian date can subsequently be used, for example, to compare dates in different calendars or create an equivalent date in a particular calendar.

适用于