Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

Getting current date and time in C#

DateTime.Now will give the current date and time.

Code:

using System;

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

    }
}


Output:
21-07-2012 14:46:11

..