Let's say I have a function that takes a string. That string contains the fully name of an enum type (e.g. "MyCompany.Area.AotherNamespace.MyEnum").
How could I create an array of strings (or List<string>
) whose elements are the values of MyCompany.Area.AotherNamespace.MyEnum
?
Is that even possible?
I'm basically trying to serialize an enum type serverside and then output it in clientside JavaScript so I don't have to define an enum in two places--in my C# and my JavaScript.