Mega Code Archive

 
Categories / C# / Date Time
 

Create a new TimeSpan to the specified number of ticks

using System; class TimeSpanCtorLDemo {     static void CreateTimeSpan( long ticks )     {         TimeSpan elapsedTime = new TimeSpan( ticks );         Console.WriteLine(String.Format( "TimeSpan( {0} )", ticks ));     }     static void Main( )     {         CreateTimeSpan( 999999 );                     }  }