EastAsianLunisolarCalendar.ToDateTime 方法

定義

傳回 DateTime 物件,其設定為指定日期、時間和紀元。

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

表示年份的整數。

month
Int32

從 1 到 13 的整數,表示月份。

day
Int32

1 到 31 的整數,表示日期。

hour
Int32

0 到 23 的整數,表示小時。

minute
Int32

0 到 59 的整數,表示分鐘。

second
Int32

0 到 59 的整數,表示秒鐘。

millisecond
Int32

0 到 999 的整數,表示毫秒。

era
Int32

表示紀元的整數。

傳回

DateTime

設定為所指定日期、時間和紀元的 DateTime

例外狀況

yearmonthdayhourminutesecondmillisecondera 在這個曆法所支援的範圍之外。

備註

方法 ToDateTime 可以將目前行事曆中的任何日期轉換成西曆日期。 例如,您可以後續使用西曆日期來比較不同行事曆中的日期,或在特定行事曆中建立相等的日期。

適用於