static void ThreadMethod(object state) { paras vals = (paras)state; Console.WriteLine(vals.para1); Console.WriteLine(vals.para2); }
static void Main(string[] args) { paras myvalues = new paras(); myvalues.para1 = 10; myvalues.para2 = 20; ThreadPool.QueueUserWorkItem(new WaitCallback(ThreadMethod), myvalues); Console.ReadKey(); }