Mono Class Library: System.TimeSpan Overview | Members

System.TimeSpan Constructor

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

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

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.

Exceptions

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

Remarks

The specified days, hours, minutes, and seconds 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