When loading UserControl in the WinForm constructor, VisualStudio executes the InitializeComponent () method of the control, but not its constructor. This really matters because it is quite common to have some code in the constructor that cannot work during development.
Unfortunately, when you add a UserControl to another control, VisualStudio launches the InitializeComponent () method of the parent control, which calls the constructors of the child controls, and if you have an exception in these constructors, you are stucked.
How do you deal with this problem?
Brann source
share