✅ Enums in C#
Hello guys, I'm learning about what an "enum" is, I often saw this word several times without really understanding what it is or how it works.
So from what I've read, an
We declare one as follows:
Enums are mostly used where we need to represent "options". It is more user-friendly because it's easier to read
This is what I understood so far, is there anything else to add please
So from what I've read, an
enum is a distinct value type which represents a set of constants.We declare one as follows:
Enums are mostly used where we need to represent "options". It is more user-friendly because it's easier to read
if (color == Colors.Red) than if (color == 1).This is what I understood so far, is there anything else to add please