Nested Enums: The What, Why and When

If you’d prefer the video version — https://youtu.be/I6j-suUEOts

We can add enums within enums, or even within a Struct or a Class in order to make our software design come alive.

This article will take us through just that.

The example

During 2020 the UK experienced various lockdowns. During some of these the number of acceptable activities for…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store