Saturday, July 17, 2010

Difference in Time with two dates in C#

This piece of code shows the difference in two dates in C#.  I used this piece of code in my DOFF application as shown above.


DateTime dt1 = ;
DateTime dt2 = ;

TimeSpan ts = dt1 - dt2;

int days = ts.Days;

No comments:

Post a Comment

Generating "Always On Top" NSWindow in macOS across all detected displays

Also: Using UIKit & Cocoa Frameworks using Objective-C In m acOS or OS X , written in either Objective-C or Swift  Langues, you m...