NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

TimeSpan Constructor (Int32, Int32, Int32)

Initializes a new instance of the TimeSpan class to a specified number of hours, minutes, and seconds.

[Visual Basic]
Overloads Public Sub New( _
   ByVal hours As Integer, _
   ByVal minutes As Integer, _
   ByVal seconds As Integer _
)
[C#]
public TimeSpan(
   int hours,
   int minutes,
   int seconds
);
[C++]
public: TimeSpan(
   int hours,
   int minutes,
   int seconds
);
[JScript]
public function TimeSpan(
   hours : int,
   minutes : int,
   seconds : int
);

Parameters

hours
The number of hours.
minutes
The number of minutes.
seconds
The number of seconds.

Exceptions

Exception Type Condition
ArgumentException If any of the arguments are negative.
OverflowException If the computed ticks value is less than TimeSpan.MinValue or greater than TimeSpan.MaxValue.

Remarks

The Ticks value is computed by converting hours and minutes into seconds, and then multiplying the total number of seconds by TicksPerSecond. The equation is:

Ticks = ((long)hour * 3600 + (long)minute * 60 + (long)second) * TicksPerSecond

See Also

TimeSpan Structure | TimeSpan Members | System Namespace | TimeSpan Constructor Overload List | Int64