using System; using System.Threading; class ThreadTest { public void Runme() { Console.WriteLine("Runme Called"); Thread.Sleep(10000); } public static void Main(String[] args) { ThreadTest b = new ThreadTest(); Thread t = new Thread(new ThreadStart(b.Runme)); t.Start(); Console.WriteLine("Thread 't' started."); Console.WriteLine("There is no telling when " + "'Runme' will be invoked. "); t.Join(); Console.WriteLine("Thread 't' has ended."); } }
Latest Posts
Popular Posts
-
I am *very* keen on automating tests, so I was looking into unit testing a WCF service. If I say "unit test", I mean a fast ,...
-
It's easy I thought, just select the Property of the EntityType and set the Default Value in the Properties window to: DateTime.Now ...
-
*Updated* 26. September 2010: Updated with comments from Adam Cogan *Updated* 27. September 2010: Updated the comparison between anonymo...
No comments:
Post a Comment