I know it's a somewhat silly question, but how do I wait a specified time ? The Sleep function is a method of my thread, but how do I get the thread I'm in ?
Printable View
I know it's a somewhat silly question, but how do I wait a specified time ? The Sleep function is a method of my thread, but how do I get the thread I'm in ?
This sleeps -
Code:using System;
using System.Threading;
namespace Sleep
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
static void Main(string[] args)
{
Console.Write("..1..");
Thread.Sleep(1000);
Console.Write("..2..");
}
}
}
DOH !
Thanks :)
> but how do I wait a specified time
Oh my God! This question's been answered half a million times before! And that's just today! Use the search, you lazy bastard! :p
well... this is my assignment, and it's due in three and a half minutes, so I had no time to look it up myself ;)
lol, that's exactly like Java.