Subtracting months from a date in C#

We can subtract months from a date like below.
C# will take care of year when you subtract the months since it adheres to universal date and time rules.
The day will remain same.

using System;

namespace forgetCode
{
    class Program
    {
        static void Main(string[] args)
        {

            Console.WriteLine("Enter year in the format dd-mm-yyyy");
            DateTime dt = Convert.ToDateTime(Console.ReadLine());

            Console.WriteLine("Enter the months to subtract :");
            int months = Convert.ToInt32(Console.ReadLine());

            DateTime newDate = dt.AddMonths(-months);
            Console.WriteLine(newDate.ToShortDateString());
       
            
        }

    }
}


Output:
Enter year in the format dd-mm-yyyy
02-02-2012
Enter the months to subtract :
4
02-10-2011

..