Create a TimeSpan instance, specifying the number of ticks : TimeSpan : Date Time C# Examples


C# Examples » Date Time » TimeSpan »

 

Create a TimeSpan instance, specifying the number of ticks









    
using  System;

class  MainClas
{
    public  static  void  Main()
    {
        
        
        long  ticks  =  300;
        TimeSpan  myTimeSpan4  =  new  TimeSpan(ticks);
        Console.WriteLine("myTimeSpan4  =  "  +  myTimeSpan4);
    }
}
    
   
  
   



Output

myTimeSpan4 = 00:00:00.0000300


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Date Time
» TimeSpan