For enum to int conversion use a cast:
int i = (int)Keys.F10;
Keys k = (Keys)i;
For enum to string conversion:
string s = Keys.F10.ToString();
Keys k = (Keys)Enum.Parse(typeof(Keys), s);
Rob.
>I am saving the enum value of specific keys to an xml file which i then
> need to get the string representation. I believe KeysConverter is there
[quoted text clipped - 6 lines]
> I am not sure if i am playing with the right function or not but any
> advise or suggestions would be appreciated :)
Ahmed - 15 Apr 2005 06:47 GMT
Beautiful, thats exctly what i am looking for!
thx