J
Jon Davis
What's the easiest and cleanest way to fetch an enum value by its name?
For instance,
public enum Boy {
Bob, Billy, Joe
}
public Boy GetBoy(string boyName) {
return ?? // and no, I refuse to use switch/case.
}
Thanks,
Jon
For instance,
public enum Boy {
Bob, Billy, Joe
}
public Boy GetBoy(string boyName) {
return ?? // and no, I refuse to use switch/case.
}
Thanks,
Jon