GregorianCalendar.ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32) GregorianCalendar.ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32) GregorianCalendar.ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32) GregorianCalendar.ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32) Method

Definición

Devuelve un DateTime que se establece en la fecha y hora especificadas de la era especificada.Returns 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

Parámetros

year
Int32 Int32 Int32 Int32

Un entero que representa el año.An integer that represents the year.

month
Int32 Int32 Int32 Int32

Entero de 1 a 12 que representa el mes.An integer from 1 to 12 that represents the month.

day
Int32 Int32 Int32 Int32

Entero de 1 a 31 que representa el día.An integer from 1 to 31 that represents the day.

hour
Int32 Int32 Int32 Int32

Un entero de 0 a 23 que representa la hora.An integer from 0 to 23 that represents the hour.

minute
Int32 Int32 Int32 Int32

Un entero comprendido entre 0 y 59 que representa el minuto.An integer from 0 to 59 that represents the minute.

second
Int32 Int32 Int32 Int32

Un entero comprendido entre 0 y 59 que representa al segundo.An integer from 0 to 59 that represents the second.

millisecond
Int32 Int32 Int32 Int32

Un entero comprendido entre 0 y 999 que representa el milisegundo.An integer from 0 to 999 that represents the millisecond.

era
Int32 Int32 Int32 Int32

Un entero que representa la era.An integer that represents the era.

Devoluciones

El DateTime que se establece en la fecha y hora especificadas de la era actual.The DateTime that is set to the specified date and time in the current era.

Excepciones

era está fuera del intervalo admitido por el calendario.era is outside the range supported by the calendar.

-o bien--or- year está fuera del intervalo admitido por el calendario.year is outside the range supported by the calendar.

-o bien--or- month está fuera del intervalo admitido por el calendario.month is outside the range supported by the calendar.

-o bien--or- day está fuera del intervalo admitido por el calendario.day is outside the range supported by the calendar.

-o bien--or- hour es menor que cero o mayor que 23.hour is less than zero or greater than 23.

-o bien--or- minute es menor que cero o mayor que 59.minute is less than zero or greater than 59.

-o bien--or- second es menor que cero o mayor que 59.second is less than zero or greater than 59.

-o bien--or- millisecond es menor que cero o mayor que 999.millisecond is less than zero or greater than 999.

Se aplica a

Consulte también: