Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ENUM Woes
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
ENUM Woes
Miscellaneous
Thread ID:
01248158
Message ID:
01248158
Views:
72
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
Next
Reply
Map
View

Click here to load this message in the networking platform