DateTime.Now Causes Boxing

0 Kicks, 65 Views

Have you known that every time you call DateTime.Now the BCL causes a dynamic memory allocation due to unnecessary boxing?
This post dives into the implementation of the property, explain why this boxing occurs, and what can we do to in order to avoid id