Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ASCII to value
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Miscellaneous
Thread ID:
00981798
Message ID:
00981919
Views:
54
Dawa,

I don't know how you ended up doing this, but I wanted to point out that you don't have to have create a method to get the name of the week from your enum. You can use the Enum.GetName() method. In your example, it would work like this:
		
MessageBox.Show(Enum.GetName(typeof(DaysOfWeek), Convert.ToInt32(((char)e.KeyValue).ToString());
~~Bonnie



>Yes. It worked after using ToString as follows:
>
		MessageBox.Show(oco.NameOfWeek((DaysOfWeek)Convert.ToInt32((((char)e.KeyValue).ToString()))));
>
>
>Is there a simple way than this? That's alot of conversion.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform