Compartir a través de


TimeSpan Constructor (Int32, Int32, Int32, Int32)

Initializes a new instance of the TimeSpan structure and sets it to the specified number of days, hours, minutes, and seconds.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

Syntax

public TimeSpan (
         int days,
         int hours,
         int minutes,
         int seconds
)

Parameters

  • days
    The number of days in the specified time period.
  • hours
    The number of hours in the specified time period.
  • minutes
    The number of minutes in the specified time period.
  • seconds
    The number of seconds in the specified time period.

Remarks

The components of the specified time period — that is, the days, hours, minutes, and seconds — are converted to ticks. The new TimeSpan instance is then initialized to that number of ticks.

Version Information

Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, 4.1, and 4.2.

See Also

Reference

TimeSpan Structure
TimeSpan Members
System Namespace