DateDiff in C#

I recently switched from VB.NET to C# and found out there is no DateDiff function.


So here is a simple example of how to instead check the difference between two dates:


if (DateTime.UtcNow.Subtract(myFile.LastWriteTimeUtc).TotalSeconds > 90) myFile.Delete();


Note the use of .TotalSeconds and not .Seconds as the latter goes back to zero after each minute.

What's Going On

As you get older, priorities and interests change, and I am faced with what to do about this site.
At the moment it's a burden, all work and no fun, so I have ended up just avoiding it, which is silly.


So I am looking into options for the new year. I would like to make a new design, content based
around a forum, mixing technical and personal. But it is surprisingly hard to find an open CMS with
a good forum. Many bolt on a separate forum, others are poorly made or very basic.


As for my various downloads, I am looking at putting them some where like BitBucket.org so that I can
more easily do little updates, and others can track changes and optionally fork the code.

FOOTER TO GO HERE!