C# TimeSpan TimeSpan(Int64)
Description
TimeSpan TimeSpan(Int64)
initializes a new instance
of the TimeSpan structure to the specified number of ticks.
Syntax
TimeSpan.TimeSpan(Int64)
has the following syntax.
public TimeSpan(
long ticks
)
Parameters
TimeSpan.TimeSpan(Int64)
has the following parameters.
ticks
- A time period expressed in 100-nanosecond units.
Example
The following example creates TimeSpan objects using the constructor overload that initializes a TimeSpan to a specified number of ticks.
using System;/* w w w. j av a2 s .co m*/
class TimeSpanCtorLDemo
{
static void Main( )
{
TimeSpan elapsedTime = new TimeSpan( 999999 );
}
}
The code above generates the following result.