public static void Main()
DateTime date1 = new DateTime(2000, 3, 05);
System.Console.WriteLine(CalculateAge(date1));
public static int CalculateAge(DateTime birthDate)
var now = new DateTime(2018, 3, 05);
var age = now.Year - birthDate.Year;
if (now.Month < birthDate.Month ||
(now.Month == birthDate.Month &&
now.Day < birthDate.Day))