I have an enum which I want to get from the web.config at run-time.
I started reading about build providers, but this seems to work for classes.
Can someone point me to an example, or at least point me in the right direction.
Right now I have a comma separated list of values in the web.config, and this is not type-safe and is prone to errors.
If there is another approach to get this type of “dynamic-enum”, I’m open to other ideas.
Thank you!
You can use ConfigurationManager and convert value to enum: