K
kc
I'm trying to pull data from a database that I have no control over the
structure of. There's a members table with a column for the member's
sex. It just stores the sex as M or F. I'd like to create an enum to
store the sex.
Is there a way that I can create a method in the Enum to convert M to
Male and F to Female, or does this method have to exist in another
class?
Thanks for any help!
structure of. There's a members table with a column for the member's
sex. It just stores the sex as M or F. I'd like to create an enum to
store the sex.
Is there a way that I can create a method in the Enum to convert M to
Male and F to Female, or does this method have to exist in another
class?
Thanks for any help!