You can do it with a little Reflection - there is an implementation of the
Enum.Parse method in the OpenNETCF.EnumEx class:-
http://www.opennetcf.org/library/Ope...overloads.html
This is part of the Smart Device Framework (
www.opennetcf.org/sdf/) and you
can find the source online on the website too.
Peter
--
Peter Foot
Windows Embedded MVP
www.inthehand.com |
www.opennetcf.org
"Michal Rizek" <(E-Mail Removed)> wrote in message
news:9F5E0EA5-B561-45D8-B81C-(E-Mail Removed)...
> Hi,
> I have a simple question:
> When i get string value for enum type can i convert it somehow back to
> enum
> type?
> I would like to do something like this....
> string str = System.Windows.Keys.Up.ToString();
> ...
> System.Windows.Forms.Keys val = str;