Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cast Enum Value
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Cast Enum Value
Divers
Thread ID:
01277973
Message ID:
01277973
Vues:
66
In the code below, I'm getting:

Cannot implicitly convert type 'Junk.Program.Titles' to 'int'. An explicit conversion exists (are you missing a cast?)
enum Titles : int 
{ 
  Mr, 
  Ms, 
  Mrs, 
  Dr
}

int iSelectedTitle = Titles.Dr;
What's wrong here?

Thanks
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform