Dictionary Extensions

While trying to add items to a dictionary I discovered that there’s no equivalent of the AddRange which is available for lists. This is for good reason as adding a KeyValuePair to a dictionary requires first checking that the given key doesn’t already exist and so is more computationally expensive Read more

Parsing Strings to Boolean Values with C#

In trying to parse some URL parameters in a project I realised that Boolean.Parse and Boolean.TryParse work in slightly different ways and that neither was broad enough for my purposes. Boolean.TryParse Boolean.TryParse takes a string input parameter and a Boolean output parameter and returns a Boolean specifying whether the input Read more

Azure Web App In App MySQL

If you’re setting up a WordPress site in an Azure Web App then an easy option for hosting the required MySQL database is to use the MySQL in app option of the Web App rather than setting up a new MySQL server. Though it’s worth noting that this isn’t very Read more