c# - How I send 2 integer arguments using a Timer.tick event handler -


i have constructor timer.tick event,

public playme(int rows, int cols) {     this.rows = rows;     this.cols = cols;      delay = new timer();     delay.enabled = false;     delay.interval = 550;     delay.tick += delay_tick;      restart = new timer();     restart.enabled = false;     restart.interval = 550;     restart.tick += restart_tick(rows,cols); 

how fire both rows , cols arguments inside timer.tick method?

void restart_tick(int rows, int cols) {     restart.stop();      if (gameover && lbllose.visible)     {         clearboard();         createboard(rows,cols);     }      if (gameover && lblwin.visible)     {          (int = 0; < 5; i++)         {             clearboard(); 

rewrite:

restart.tick += (object s, eventargs a) => restart_tick(s, a, rows, cols); 

and method:

  void restart_tick(object sender, eventargs e,int rows, int cols) 

Comments

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -