Friday, 23 August 2013

Does not contain definition for object

Does not contain definition for object References It randomly encounters these errors, even when I don\'t mess with anything at all. It says \"Error 4 \'application.Form1\' does not contain a definition for \'comboBox4_SelectedIndexChanged\' and no extension method \'comboBox4_SelectedIndexChanged\' accepting a first argument of type \'awesome_application.Form1\' could be found (are you missing a using directive or an assembly reference?) C:\\Users\\admin\\Documents\\Visual Studio 2012\\Samples\\application\\awesome application\\Form1.Designer.cs 223 81 awesome application It had 10 occurrences of this, and has happened before. It also makes it so I cannot look at the form1.cs [design]. This is what the code looks like in the error area. // comboBox4 // this.comboBox4.DisplayMember = \"\"; this.comboBox4.FormattingEnabled = true; this.comboBox4.Items.AddRange(new object[] { resources.GetString(\"comboBox4.Items\")}); resources.ApplyResources(this.comboBox4, \"comboBox4\"); this.comboBox4.Name = \"comboBox4\"; this.comboBox4.SelectedIndexChanged += new System.EventHandler(this.comboBox4_SelectedIndexChanged); The error is at \"system.EventHandler(this.comboBox4_selectedIndexChanged\" at the end. Thanks for helping.

No comments:

Post a Comment