Geeks With Blogs
New Things I Learned July 2009 Entries
Comparing Nullable Values
Recently we have to create methods that will manually compare 2 objects and see if they are equal – essentially check if all their properties / fields are equal. Some of the fields are Nullable Types, which have been available since .NET 2.0 (VS2005). It is a nice construct to have, especially to represent database fields that can also be null – this makes coding simpler because a nullable type can also contain null as a valid value. Interestingly, talking some some people that have done .NET for ......

Posted On Friday, July 31, 2009 5:59 AM

Base class for Singleton Pattern with Generics
The singleton pattern is pretty well known – the idea is to create a single instance of an object, and only use that particular instance forever. The construct should disallow creation of additional objects, preferably through some language construct, rather than through using manually checking, or initializing a flag. A typical example would be like the following: public class MySingleton { private MySingleton() { } private static MySingleton _instance = new MySingleton(); public static MySingleton ......

Posted On Friday, July 24, 2009 8:11 AM

Measure more accurately with Stopwatch
I’m finding that writing blogs actually take quite a bit of time; so I’m writing this fairly short blog in Live Writer, with the hope that I can be more productive since the tool will make it easier for me to blog. So, we’ll see :). I’ve used the Stopwatch class for as long as I can remember. I don’t even remember whether I get to know the class from just browsing MSDN, or reading it from another blog, or just playing around typing stuff (and looking at what’s available through Intellisense). Whenever ......

Posted On Tuesday, July 14, 2009 12:08 PM

Copyright © Muljadi Budiman | Powered by: