I have many containerControls on my App (desktop), and I need instantiate with the names that I found from MySql Database. In my table, I have a pair of strings that contain a name of the container control, and a name for the component(variable). It's for a permission system. But when I try to create a new control with the name from database, I have a type mismatch error, because I'm trying to create a container control from a String...
Something like this…
Dim myVariable as new myContainerControlVariable
… where myVariable and myContainerControlVariable are Strings, with the names from database.
I looked at factory methods, but my containers are very different between them. So, I think that is more easy to use a simple “select case”, where I can compare strings from table and instantiate de containers… I like to have something more “automatic”, or more “automagic”, but…