im writing an app that scripts a database out to a directory. the user can select to only script tables, or permissions, or sprocs, or all. i dont wana have code like:
if(scripttables == true)
{
//script tables
}
if(scriptSprocs == true)
{
//script sprocs
}
if(scriptPermissions == true).......
that could go on forever, depending on how many groups of things you want to script. can delegates be used or something that looks a little better?
if(scripttables == true)
{
//script tables
}
if(scriptSprocs == true)
{
//script sprocs
}
if(scriptPermissions == true).......
that could go on forever, depending on how many groups of things you want to script. can delegates be used or something that looks a little better?