Hi,
As the title suggests, I am looking for soemthing which would
essentially give me a nested enum, or perhaps someone can suggest a more
suitable approach to my problem.
I have a DLL which allows the user to select which type of DB they are
using and also how to connect (ODBC, OleDb etc) and I want this all
available through one type:
For example
DBType.SQLServer.ODBC or
DBType.MySQL.ODBC etc
So after the DBtype, I need an enum of the DB types, but for each DB, I
would like a further subset of options.
I have tried this using a structure:
public struct DBType
{
SQLServer SQLServer;
};
public enum SQLServer
{
Default = 0,
ODBC = 1,
OleDB
}
But this is not good for the user, since I cant do
DBType.SQLServer.ODBC, instead SQLServer.ODBC.
Any help on this would be appreciated.
Regards,
Steven
*** Sent via Developersdex http://www.developersdex.com ***