Does C# offer a way to create Enum type from scratch using reflection?
Suppose, I have a collection of strings: {"Single", "Married", "Divorced"} and I'm willing to build the following enum type in runtime:
enum PersonStatus
{
Single, Married, Divorced
}
Is this somehow possible?
enumis a contract, what is the meaning of creating it in runtime?