Using C# enum in a switch statement can often result in cleaner code, also it helps reduce the chances of any typo's creeping into your code.
In this post, I'm going to update the font size, font colour and section background colour by pulling the values from Umbraco and then use a C# switch case to compare the value with public enum values, I will not be using any break default values in this example, but you can add them if you require a break case.
I will not show the properties and doctype for the Umbraco CMS, but you can download the code for this example at the bottom of the page.
Code for setting up the C# enum in a switch case.
To start we need to create a controller, view model, helper class and view to get the values from the switch statement and display on the page.