Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Threading;
- using System.Threading.Tasks;
- namespace MoreMethodExercises
- {
- class Program
- {
- static void Main()
- {
- ThreadPool.QueueUserWorkItem(Go);
- ThreadPool.QueueUserWorkItem(Go, 123);
- Console.ReadLine();
- }
- static void Go(object data) // data will be null with the first call.
- {
- Console.WriteLine("Hello from the thread pool! " + data);
- }
- }
- }
Add Comment
Please, Sign In to add comment