c# - No overload for 'textBox1_TextChanged' matches delegate 'System.EventHandler' -


hello everyone. first program , within in 5 minutes have error. i've started today using c#, know should looking around, didn't think there problem doing.

my program generator depending on user picks or types in textboxes depends on outlook of generated code.

i have 2 text boxes named: textbox1, , generatedcode

when press checkbox1 allows textbox1 used.

when press button created string "testing" (which make sure did right).

when pressed f5 test build came error:

no overload 'textbox1_textchanged' matches delegate 'system.eventhandler' 

i not know means.

here's code:

    public void checkbox1_checkedchanged(object sender, eventargs e)     {         switch (checkbox1.checked)         {             case true:                 {                     textbox1.enabled = true;                     break;                 }             case false:                 {                     textbox1.enabled = false;                     break;                 }         }     }     private void textbox1_textchanged()     {      }      public void button1_click(object sender, eventargs e)     {         generatebox.text += "testing";     }      private void generatebox_generated(object sender, eventargs e)     {      } 

this form1.designer in c++:

//     // textbox1    //     this.textbox1.enabled = false;    this.textbox1.location = new system.drawing.point(127, 3);    this.textbox1.name = "textbox1";    this.textbox1.size = new system.drawing.size(336, 20);    this.textbox1.tabindex = 1;    this.textbox1.textchanged += new system.eventhandler(this.textbox1_textchanged); //error    //     // generatebox    //     this.generatebox.enabled = false;    this.generatebox.location = new system.drawing.point(84, 6);    this.generatebox.maxlength = 1000000;    this.generatebox.multiline = true;    this.generatebox.name = "generatebox";    this.generatebox.scrollbars = system.windows.forms.scrollbars.vertical;    this.generatebox.size = new system.drawing.size(382, 280);    this.generatebox.tabindex = 1;    this.generatebox.textchanged += new system.eventhandler(this.generatebox_generated); 

the function textbox1_textchanged should have 2 arguments below accepted eventhandler in case

textbox1_textchanged(object sender, eventargs e) 

Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -