usercontrols:里面写法如下:
public delegate void ButtonClickHandler(); public event ButtonClickHandler ButtonClick;
form1里面定义时间:
this.usercontrols.ButtonClick += new UserControl.UserMngControls.UserLogin.ButtonClickHandler(this.usercontrols _ButtonClick); private void userLogin1_ButtonClick() { MessageBox.Show(this.userLogin1.MReturn.ToString()); } |
委托的用法
最新推荐文章于 2022-08-19 13:50:11 发布