I am new to threading, so please forgive me if my question is at an amateur level.The example below is a simplified version of what I am trying to do. This works if method go is static, I want it to work when Go is not static. How do I make it work.
using System; using System.Threading; using System.Diagnostics; public class ThreadPoolExample { static void Main() { for (int i = 0; i < 10; i++) { ThreadPool.QueueUserWorkItem(Go, i); } Console.ReadLine(); } void Go(object data) { Console.WriteLine(data); } } If someone can make this work and add a notification that all threads have completed execution, that would be awesome.