I need to instantiate various objects and add them to form. The objects classes (and some other information, such as coordinates and text) are stored in a table, as strings.
All I managed to do so far is this:
var obj = Activator.CreateInstance(typeof(Form).Assembly.GetType("System.Windows.Forms.TextBox"));
How do I access a property of the above object? I don't want to cast it to a TextBox because it defeats the initial purpose - to be able to instantiate the object directly from the string. It may be a textbox, or a combobox, or anything else, can't use a switch.
Thank you :)