TimeSpan Constructor (Int32, Int32, Int32, Int32, Int32)
Initializes a new instance of the TimeSpan structure and sets it to the specified number of days, hours, minutes, seconds, and milliseconds.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
public TimeSpan (
int days,
int hours,
int minutes,
int seconds,
int milliseconds
)
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. - milliseconds
The number of milliseconds in the specified time period.
Remarks
The components of the specified time period — that is, the days, hours, minutes, seconds, and milliseconds — are converted to ticks. The new TimeSpan object 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.