Wednesday, December 10, 2008

How to know the number of ticks from 1970 to 2007?

There are situations wherein you need to know the time interval in a split second. The DateTime.Now.Ticks is very useful in this said situation.

Here's a sample code to display how many ticks there are from 1970 to 2007.

using System;


namespace Ticks
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(DateTime.Now.Ticks );
Console.ReadKey();
}
}
}


Output: 633645793615625000

1 comment:

  1. yeah,we agree with you sir..We hope to read more articles about this topic soon..
    God bless us

    ReplyDelete