You can use Enum.Parse. This will convert CtrlA to Shortcut.CtrlA. You just need to remove the + from the string.
-----Original Message----- From: Luis Abreu [mailto:[EMAIL PROTECTED]] Sent: Monday, May 27, 2002 8:09 PM To: [EMAIL PROTECTED] Subject: [DOTNET] Creating Shortcut enum from string Hello guys. I'm wondering if it's possible to retrieve the correct Shortcut enum value from a string like this Ctrl+A (which should be transformed in Shortcut.CtrlA). well, my problem is that I must develop an easy way to load a xml file and transform it into a menu (the xml is supposed to be written by hand). I have almost everything set, but one of the few problems I'm having is how can I transform string into enumeration values. Should they be stored as integers? I've also tried loading an int and converting it to a shortcutbut without any luck. any ideas? -- Regards, Luis Abreu http://www.luisabreu.go.cc/ mailto:[EMAIL PROTECTED] --------------------------------------------- "Those who give up never win, and those who win never give up!", Luis Abreu --------------------------------------------- You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.