How to use Lazy initialization in C#

Reading Time: 3 minutes Background Lazy initialization (instantiation) is a technique to delay the creation of an object until the first time the application requires the object. This technique provides a mechanism to control when an object is created. Lazy initialization provides an advantage of improving performance by avoiding unnecessary computation and memory footprint. The most typical implementation of […]

C# Value Types performance problems and solutions.

Reading Time: 4 minutes Some years ago I worked on a project where I built a small rules engine. The rules runs anytime a user logs into the application and it deals with a fairly large amount of data. Therefore its performance is a key consideration. In this article I discuss: How Value Types are stored in memory How […]