c# - Using Directives or Assembly Reference -
c# - Using Directives or Assembly Reference -
i added buttons form, doubled clicked wrong 1 , took me code editor.
i decided delete generated code resulted clicking wrong button. did rebuild , ended getting error:
error 1 'xxxxx' not contain definition 'xxxxx' , no extension method 'subtraction_checked' accepting first argument of type 'xxxx' found (are missing using directive or assembly reference?)
how resolve this?
when double click on button
, creates event handler in designer generated code as:
this.button1.click += new system.eventhandler(this.button1_click);
and in code editor see this:
private void button1_click(object sender, eventargs e) { }
now, if remove handler, error. resolve need remove event designer generated code i.e. this.button1.click += new system.eventhandler(this.button1_click);
same goes checkboxes, textboxes , other controls well.
c# winforms
Comments
Post a Comment