c# get current date

C#
 DateTime now = DateTime.Now;
Source

Also in C#: