Thread m_Thread1 = new Thread(new ParameterizedThreadStart(m_channelBase.Run));
m_Thread1.Start(true);这个m_channelBase的RUN方法的定义:public abstract void Run(bool debug);
为什么我在编译的过程中出现这个错误?
Error 1 No overload for 'Run' matches delegate 'System.Threading.ParameterizedThreadStart'm_channelBase是实现类,里面重写了RUN方法,但是为什么会有这样的问题,请各位帮忙分析一下,多线程编程我第一次用,是不是调用的方式不对啊?
public Monitor(string monitorip, int port)
{
this.Serverip = monitorip;
this.Serverport = port;
} public void MonitotThread()
{
SMS sms = new SMS(Serverip);
Thread t = new Thread(new ThreadStart(sms.MonitotThread));
}
public void RunWrapper(object debug)
{
bool b = (boole)debug;
this.Run(b);
}然后
Thread m_Thread1 = new Thread(new ParameterizedThreadStart(m_channelBase.RunWrapper));
public abstract void Run(object debug);