With Reflection like this:
class Program
{
class Customer { }
class Vendor { }
class Importer { }
static void Main(string[] args)
{
string strClassName = nameof(Importer);
if (strClassName == nameof(Importer))
{
Importer importerInstance = Activator.CreateInstance(typeof(Importer)) as Importer;
}
else if (strClassName == nameof(Vendor))
{
Vendor importerInstance = Activator.CreateInstance(typeof(Vendor)) as Vendor;
}
}
}