我尝试在其他方法中动态调用一个方法,但是这段代码不起作用。我该怎么做 ?
#region Form1_Load()
private void Form1_Load(object sender, EventArgs e)
{
Load();
//this line
InitTimer(this.Form1_Load(sender,e));
}
#endregion
#region Timer()
public void InitTimer(dynamic _method)
{
System.Windows.Forms.Timer timer1;
timer1 = new System.Windows.Forms.Timer();
timer1.Tick += new EventHandler(_method);
timer1.Interval = 5000; // in miliseconds
timer1.Start();
}
#endregion