add Heterogeneous enum, and description (#18930)
Add description of use for enums
This commit is contained in:
committed by
Quincy Larson
parent
b9520deece
commit
2023d2bab5
@@ -25,4 +25,14 @@ enum StringBasedEnum {
|
|||||||
Programming = "is fun",
|
Programming = "is fun",
|
||||||
Pizza = "is good"
|
Pizza = "is good"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Heterogeneous based enum
|
||||||
|
enum HeterogeneousBasedEnum {
|
||||||
|
Day = 2,
|
||||||
|
Pizza = "is good"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Like Constants Enums are ready only. its imperative to understand that the benefit of using an Enum vs a Constant is it allow developers to organize collections of related values.
|
||||||
|
Reference in New Issue
Block a user