vendredi 20 janvier 2017

How do I access the values of any known enum at run-time?

I need to write a service level api that exposes any enumeration at run-time. The name of the enum will be passed as a string parameter to the service layer. So that means I need to use reflection.

All of the answers I've found so far deal with knowing ahead of time the name of the enumeration. I need to have a string that holds the name of the enum and look it up using reflection and spit out all of the values if I'm able to find the enum.





Aucun commentaire:

Enregistrer un commentaire