I am wondering if there is a function in c# that will allow me to wait a certain amount of time before going on to the next procedure?

Also, I was wondering if there is a function that simulates hitting the enter button on the keyboard.

Thanks in advance.

1. You can insert a timer.
On time event should contain procedure you want to call.

2. On click (on key press) event should do the task.


private void form1_KeyPress(object sender, KeyPessEventArgs e)
if (e.KeyChar==13) { // You should insert here code that should be executed // }


Do you need to make a new thread to use a timer, or can you just say


Thanks for the help

I am not sure for Console Apps, but in Windows Apps you have a component named timer (on WINDOWS FORMS toolbox). you shoud set interval, and in ON TICK event you should insert code.