Hello, does anybody have a good example how to call one of many UserControls by a string:
I have many classes like:
public partial class UserControl1 : UserControl
public partial class UserControl2 : UserControl
public partial class UserControl3 : UserControl
and main Form, and a string:
public partial class MainForm : Form
string[] callUserControl = {UserControl1,UserControl2,UserControl3};
In specific event, I would like to call a UserControlX from a string[X], and pass that control to a panel.
Those are names of user control classes, and i want to pass the type of a control to the panel but by selecting it from a string.
Something like a Reflection
Thanks in advance!