Adding literals to an existing Enum at runtime

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have seen an example of how to create a new Enum at runtime using
EnumBuilder.

However, I was wondering if I could add literals to an existing Enum at
runtime ?
 
However, I was wondering if I could add literals to an existing Enum at
runtime ?

No, you can't change existing types at runtime, whether or not they
are enums.

Why do you want to do that anyway? Since enum members are constants,
they are mostly used at compile time.



Mattias
 
I agree.
I actually wanted to explore all options to somehow synch my enums with the
DB.
The only way would be to run an emitter exe periodically to generate an
assembly.
The emitter exe would fetch the values from the DB and generate appropriate
enums.
 
Back
Top