June 25, 2008
Well, you learn something new every day. Although explicit interface implementations are fairly common when you are implementing two interfaces with conflicting (ie, the same) member signatures, they can also be used to “hide” a interface member.
While working with the RegistryKey class today, I noticed that even though it implements IDisposable, it does not publicly expose Dispose(). Read on to find out why.
(more…)
June 19, 2008
An interesting, although generally basic, problem with Windows Forms is how to implement the singleton pattern on the forms. What do I mean? Well, consider this…
You’re writing a Windows Forms application and you have a bunch of Forms, such as a Preference window, an About window and so on. You’d like these forms to be modeless, yet you don’t want the user to be able to create more than one of them.
It’s a common problem, but there’s no built in way to handle it. Moreover, I’ve yet to see an elegant solution to it. The method explained below, which is as elegant as it’s going to get, creates a pseudo-factory class to manage the problem for you. Read on to find out more.
(more…)
June 17, 2008
So, welcome to my newly designed website: my little home in cyberspace. Here you’ll find a small collection of things that I have, well, collected, over the years. The software page is probably the most interesting, for now.
This blog will see periodic updates about various topics. Mostly, you’ll see software development related stuff on here, but really, you’ll just have to wait and see. Anyhow, subscribe to the RSS feed and I’ll catch you soon ;-).