Returns a DateTime object that is offset the specified number of months from the specified DateTime object.
- time
- The DateTime to which to add months.
- months
- The positive or negative number of months to add.
A DateTime object that represents the date yielded by adding the number of months specified by the months parameter to the date specified by the time parameter.
The DateTime.Kind property of the returned DateTime value always equals DateTimeKind.Unspecified. You can preserve the DateTime.Kind property of the time parameter by calling the DateTime.SpecifyKind(DateTime, DateTimeKind) method, as the following example shows.
code reference: System.Globalization.Calendar.AddMethods#5