Custom Typessuggest change
struct is used only when performance is very important. Since value types live on the stack, they can be accessed much quicker than classes. However, the stack has much less room than the heap, so structs should be kept small (Microsoft recommends
structs take up no more than 16 bytes).
class is the most-used type (of these three) in C#, and is generally what you should go with first.
enum is used whenever you can have a clearly defined, distinct list of items that only need to be defined once (at compile time). Enums are helpful to programmers as a lightweight reference to some value: instead of defining a list of
constant variables to compare to, you can use an enum, and get Intellisense support to make sure you don’t accidentally use a wrong value.