c# - Windows forms editor keeps recreating an event method -
i have c# application custom control. custom control class looks this:
public partial class detnumericupdown : updownbase { public event eventhandler valuechanged; /* public methods */ public detnumericupdown() { /* ... */ } }
then have several instances of detnumericupdown in form file main.cs, placed designer. each of these instances have own valuechanged event defined, instead of placing them in main.cs have moved them clarity file otherfile.cs. problem each time try use windows forms designer on main.cs recreates these methods in main.cs , complains methods defined twice. happens detnumericupdown instances, have moved event methods other controls otherfile.cs , works fine. doing wrong?
Comments
Post a Comment