mardi 8 décembre 2020

How to set an Enum's numeric value

Is there a way to set the underlying value of an enum (e.g. via reflection)? And what will happen if there is no matching enum entry for the set value?

Bonus: What would be the implications for someone using the enum after it was set to an "invalid" value?

Thanks!





Aucun commentaire:

Enregistrer un commentaire