Timeline for How do I cast int to enum in C#?
Current License: CC BY-SA 3.0
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 8, 2024 at 10:18 | review | Low quality answers | |||
| Oct 9, 2024 at 11:46 | |||||
| Oct 10, 2019 at 22:32 | comment | added | derHugo | But enums also make sure the values are all unique, something this approach is also lacking | |
| May 23, 2017 at 10:31 | history | edited | URL Rewriter Bot |
replaced http://stackoverflow.com/ with https://stackoverflow.com/
|
|
| Jan 7, 2016 at 20:11 | history | edited | Peter Mortensen | CC BY-SA 3.0 |
Named the link. Expansion.
|
| Sep 10, 2014 at 17:33 | comment | added | Thierry | There is at least one situation that I have found in which enum type safety can be unintentionally bypassed. | |
| Sep 1, 2014 at 9:37 | comment | added | Ted | Paul, this is a method of collecting together related int constants (e.g. Database id constants) so they can be used directly without having to cast them to int every time they're used. Their type is integer, not for example, DatabaseIdsEnum. | |
| Sep 1, 2014 at 7:41 | comment | added | Paul Richards | enums superseded the use of integer constants like this since they provide more type safety | |
| Jul 17, 2014 at 14:39 | history | answered | Ted | CC BY-SA 3.0 |