A [switch](http://msdn.microsoft.com/en-us/library/06tc147t.aspx) might be neater here