The helping posts of different tips and tricks for development in ASP.net, WCF, Silverlight and RIA Services.
If you ever want to calculate the difference between two points of time …
DateTime startTime = DateTime.Now;
…. Your code comes here …..
TimeSpan elapsedTime = DateTime.Now - startTime;
string TimeSpent = elapsed.ToString(); // ##:##:##
No comments:
Post a Comment