The Darkness Behind DateTime.Now

Posted on ASP alliance See other posts from ASP alliance
Published on Tue, 31 May 2011 00:00:00 GMT Indexed on 2011/06/20 16:25 UTC
Read the original article Hit count: 194

Filed under:
DateTime.Now is one of the commonly-used properties in the .NET Framework in the majority of applications designed. Although this property is designed to serve for particular purposes, the lack of understanding and training has driven many .NET developers to use it in wrong circumstances where other options like DateTime.UtcNow property and Stopwatch class should be used and are recommended. In this article we discuss these three options along with the main applications of each, and provide a quantitative comparison between them to show why DateTime.Now is expensive and should not be misused in many cases.

© ASP alliance or respective owner