Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ASCII to value
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Divers
Thread ID:
00981798
Message ID:
00981919
Vues:
56
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform