tags:

views:

519

answers:

4
for(int i=0; i<mylist.items.count; i++)
{
   if(i==myvalue[i])
   {
     //call Timer! Wait timer interval if timer is tick, continue for loop!
   }

   timer_click()
   {
   // application
   }
}

How can I use the for loop with timer to pause execution if the value in the conditional is a certain value?

A: 

i'm not sure if I understand the question but you should read about the stopwatch class

Fredou
+4  A: 

You shouldn't. Why do you want to, or what are you trying to do by this?

Use Thread.Sleep() if you want the loop to stop for a period of time.

StingyJack
+1  A: 

Well you could use Thread.Sleep() no? But you really should have a good reason to put a timer on the server side, it's not considered a good thing.

annakata
A: 

Why would you ever want to pause execution of something? This would certainly make for a poor user experience. Think before you use it.... But like others have said ... its

Thread.Sleep(some ms);
Mike Fielden