I wanted to write a little bit about using the Windows registry from a .NET language. I’ve been working on a small desktop application and I wanted to store some state information that is used upon starting the application. The Windows registry made sense in this particular instance. Naturally, I turned to the Google machine to find some code examples on access the registry only to find that most of the code examples didn’t work at runtime, at least under the .NET Framework 3.5. I corrected the problem and am sharing the code with anyone interested.