Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ENUM Woes
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
ENUM Woes
Divers
Thread ID:
01248158
Message ID:
01248158
Vues:
73
I have the following:
namespace MyProject
{
    public enum DatabaseType
    {
        MSSQL,
        Oracle
    }

    class MyClass
    {
       public int iDataBaseType = DatabaseType.MSSQL; 
    }
}
The iDatabaseType line throws the error
"Cannot implicitly convert type 'DataAccess.DatabaseType' to 'int'. An explicit conversion exists
(are you missing a cast?)"

Can someone enlighten me?

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