|
Listing 14-27 extracted from chapter Unsafe code, exceptions, anonymous methods, iterators
Listing 14-26< > Listing 14-28
This listing can be compiled with the command line: csc.exe /target:exe Example_14_27.cs Errors: 0 Warnings: 0
Example_14_27.cs
using System.Threading;
class Program {
static void Main() {
for (int i = 0; i < 5; i++)
ThreadPool.QueueUserWorkItem( delegate {
System.Console.WriteLine(i); }, null);
}
}
Copyright Patrick Smacchia 2006 2007
|