3 ms·
What's the basic idea here? That instead of ints or strings, your enum values themselves are instances of custom classes with whatever behavior you want?
by nerdponx 6y ago
What's the basic idea here? That instead of ints or strings, your enum values themselves are instances of custom classes with whatever behavior you want?
- NicoJuicy 6y agoIf I would describe the use-case: If you use switches with enums for functionality, this is a better way ( personal opinion). Since Enums quickly need more than 1 switch and this could wrap that behaviour Your description is also pretty good