Mono Class Library: System.TimeSpan Overview | Members

System.TimeSpan Constructor

Constructs and initializes a new TimeSpan with the specified numbers of days, hours, minutes, seconds, and milliseconds.

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

Parameters

days
A int that specifies the number of days with which to initialize the new TimeSpan.
hours
A int that specifies the number of hours with which to initialize the new TimeSpan.
minutes
A int that specifies the number of minutes with which to initialize the new TimeSpan.
seconds
A int that specifies the number of seconds with which to initialize the new TimeSpan.
milliseconds
A int that specifies the number of milliseconds with which to initialize the new TimeSpan.

Exceptions

TypeReason
ArgumentOutOfRangeExceptionThe parameters specify a TimeSpan value less than TimeSpan.MinValue or greater than TimeSpan.MaxValue.

Remarks

The specified days, hours, minutes, seconds, and milliseconds are converted to ticks, and that value is used to initialize the new TimeSpan.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0