I need to get the number of months between two dates. Unfortunately the timespan object does not provide that. It is easy enough to calculate, but even better: use VB! Add a reference to Microsoft.VisualBasic in your project and then in your code add:
DateAndTime.DateDiff(DateInterval.Month, startDate, endDate
,FirstDayOfWeek.Sunday, FirstWeekOfYear.Jan1);
The problem you’ll run in to is the last two parameters. In VB they are not required, but you have no way to not send them in C#. In my case the parameters I chose will work well enough. YMMV.