Note how you can extend any type.
More Info: http://msdn.microsoft.com/en-us/library/bb383977.aspx
Note how you can extend any type.
More Info: http://msdn.microsoft.com/en-us/library/bb383977.aspx
| public static int TotalMonths (this DateTime start, DateTime end) { | |
| return (start.Year * 12 + start.Month) - (end.Year * 12 + end.Month); | |
| } |