Well, I don't think the name says it right ... but here goes:
I have a class with 40 Enums. i.e:
Class Hoohoo
{
public enum aaa : short
{
a = 0,
b = 3
}
public enum bbb : short
{
a = 0,
b = 3
}
public enum ccc : short
{
a = 0,
b = 3
}
}
Now say that I have a dictionary of strings and values, and each line is the name of the above enumerations:
Dictionary<string,short>{"aaa":0,"bbb":3,"ccc":0}
I need to change "aaa" to HooBoo.aaa to look at 0. It might not seem like finding a way to do this, since enum is static. Otherwise, I will have to write a method for each enumeration in order to associate a string with it. I can do it, but thats mucho for writing.
Thanks Cooter
source
share