事件响应的公共方法

//sender:表示的是“事件源”对象
 privata void btn_TeacherClick(object sender,EventArgs e)
{
   string txt = ((Button)sender).Text;
   MessageBox.Show(txt + "您好!");
}

  

猜你喜欢

转载自www.cnblogs.com/adozheng/p/12077119.html