My windows form application form form is giving an error when i change to design mode in visual studio 2015.
It says "The variable 'componentResourceManager' is either undeclared or was never assigned. "
Here is the line with the error
- this.pictureBox1.Image = (Image) componentResourceManager.GetObject("pictureBox1.Image");
- and here is how i initialized the resourcemanager
- private void InitializeComponent()
- {
- this.components = (IContainer) new Container();
- ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (frmMainMDI));
But when i run the application all the forms load well.What could be the problem?