Search code examples
c#windowsfunctiondelay

How can i put a delay with C#?


I want to make an application to execute several instructions to pass the following instruction has to wait a few milliseconds.

Such that:

while(true){

  send("OK");
  wait(100); //or such delay(100);

}

Is it possible in C#?


Solution

  • Thread.Sleep(100); will do the trick. This can be found in the System.Threading namespace.