Site Archives

Enumeration list box


As the name suggests, the enumeration list box is a list box which shows and sets enumeration values using radio buttons. But this post is not really about the ListBox or RadioButton. It about how to populate a list box (displaying radio buttons or pictures of cherubs) from an enumeration. There’s a project to accommpany […]

Loading from and saving property values to a config file


Not an inspiring title, after all it’s not difficult to read from or save to a configuration file. That’s true, but this post is about a technique that’s useful in many scenarios but especially when using the MVVM pattern. It involves very little code: a custom attribute and three extension methods. In the System.Configuration namespace […]

.NET RSA provider and PEM interchange


PKI support in the .NET framework comes in the form of the RSACryptoServiceProvider class. However PKI is a standard used on all platforms not just .NET so interoperability is important. Strange, then, that the RSACryptoServiceProvider provides no mechanism to save the public and/or private key an RSACryptoServiceProvider instance in a portable format such as PEM. […]