   c# - create enum in run time
  Hi.Is it possible to create an enum class from an array of strings in run time?thanks in advance   
  Not quite so easily, no, though it is possible to use Reflection.Emit to define an enum at runtime and "bake" it for immediate use.  This is much easier if you are using .NET 2.0, but either way the full answer is far more than I have time for ATM.  Hope this post helps anyways.   ;  Yep, that'll do.thanks :)   ;  How would you *use* a dynamically created enum?   ;  I have a thread accessing a large hashtable many tims per second.Though i didnt check it yet, but i suspect having a string as key,would require more of the cpu than having a costant as key.The string keys are not constant in every run, and dependon some config XML (thats why i cant use a predefined enum).Once i have the Type of the enum, i can use it to cast strings to enum,get a value list, get a name list, etc'.   