摘要: 为线程传递参数,在实际应用中,线程需要得到运行时的参数,然后,在执行相关程序任务。如何为线程执行前,将线程方法中需要的数据进行传递呢?本文将介绍该方法。 有两种方式可以为线程传递相关的参数。我们逐一进行介绍。1.使用带ParameterizedThreadStart委托参数的Thread构造函数例子:1.Thread参数调用using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;namespace ThreadTest{ class P... 阅读全文
posted @ 2012-01-15 23:07 金丝猴 阅读(171) 评论(0) 推荐(0) 编辑