How to calculate the difference in months between two dates in C#?
Is there is equivalent of VB\'s DateDiff()
method in C#. I need to find difference in
I checked the usage of this method in VB.NET via MSDN and it seems that it has a lot of usages. There is no such a built-in method in C#. (Even it's not a good idea) you can call VB's in C#.
Microsoft.VisualBasic.dll
to
your project as a reference Microsoft.VisualBasic.DateAndTime.DateDiff
in your code