From: http://blogs.msdn.com/brada/archive/2004/12/21/329270.aspx
using System;
using System.Threading;
public class Class1
{
public static void Main ()
{
new Thread(delegate
{
Console.WriteLine("On another thread");
}).Start();
}
}
I couldn't see why it could ever worked, but then looking at his solutions http://blogs.msdn.com/brada/archive/2004/12/27/332863.aspx
I see why I didn't like it. I would have used the first version of his solution:
new Thread(
delegate ()
{
Console.WriteLine("On another thread");
}
).Start();
since it looks like the way a delegate would be initialized and a function that a thread would call.
No comments:
Post a Comment