Apart from all given answers I find this piece of code very straightforward. AS DateTime.MinValue is 1/1/1, we have to subtract 1 from month, years and days.
var timespan = endDate.Subtract(startDate);var tempdate = DateTime.MinValue + timespan;var totalMonths = (tempdate.Year - 1) * 12 + tempdate.Month - 1;var totalDays = tempdate.Day - 1;if (totalDays > 0){ totalMonths = totalMonths + 1;}