KoreanCalendar.ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32) Method

Definition

返回设置为指定纪元中指定日期和时间的 DateTimeReturns a DateTime that is set to the specified date and time in the specified 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

Parameters

year
Int32

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

month
Int32

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

day
Int32

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

hour
Int32

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

minute
Int32

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

second
Int32

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

millisecond
Int32

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

era
Int32

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

Returns

DateTime

设置为当前纪元中指定日期和时间的 DateTimeThe DateTime that is set to the specified date and time in the current era.

Exceptions

year 超出了日历支持的范围。year is outside the range supported by the calendar.

-或--or- month 超出了日历支持的范围。month is outside the range supported by the calendar.

-或--or- day 超出了日历支持的范围。day is outside the range supported by the calendar.

-或--or- hour 小于 0 或大于 23。hour is less than zero or greater than 23.

-或--or- minute 小于 0 或大于 59。minute is less than zero or greater than 59.

-或--or- second 小于 0 或大于 59。second is less than zero or greater than 59.

-或--or- millisecond 小于 0 或大于 999。millisecond is less than zero or greater than 999.

-或--or- era 超出了日历支持的范围。era is outside the range supported by the calendar.

Applies to

See also