|
-
Jan 21st, 2015, 12:11 PM
#1
[RESOLVED] Getting Enum value based on string
I'm still searching, but there's a crap load of posts with "enum" and "value" in it... so I'm posting this as a short cut while I still attempt to search.
Short description: I have a file that will have a field where the value will be "string" or "date" or "number" ... I need to translate these into an enum type:
Company.NameSpace.Assembly.DataTypes.String
Company.NameSpace.Assembly.DataTypes.Date
Company.NameSpace.Assembly.DataTypes.Number
Company.NameSpace.Assembly.DataTypes.Boolean
and so on... so that I can pass it to another method that's expecting the enumeration value as a parameter.
I know there's a way to go from the value to get to the "text" of the enum... is there a way to go the other way?
-tg
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|