我贴部分代码 那位有空帮看看 Thread thread1 = null;
Thread thread2 = null;
Thread thread3 = null; string html1 = html.Substring(0, html.Length / 3);
string html2 = html.Substring(html.Length / 3, html.Length / 3);
string html3 = html.Substring(html.Length * 2 / 3); thread1 = new Thread(
delegate()
{
//if (this.Search(html1))
//{
// if (thread1.IsAlive) { thread1.Abort(); }
// if (thread2.IsAlive) { thread2.Abort(); }
// if (thread3.IsAlive) { thread3.Abort(); }
// return true;
//}
if (thread1.IsAlive) { thread1.Abort(); }
}
);为什么注释掉上面所示的那部分能通过编译呢 不注释掉 就这样错误 1 与“System.Threading.Thread.Thread(System.Threading.ThreadStart)”最匹配的重载方法具有一些无效参数 D:\作业\G7\MySpider\MySpider\Form1.cs 53 23 MySpider错误 2 参数“1”: 无法从“匿名方法”转换为“System.Threading.ThreadStart” D:\作业\G7\MySpider\MySpider\Form1.cs 54 17 MySpider
在线呢 谢谢!!!!
Thread thread2 = null;
Thread thread3 = null; string html1 = html.Substring(0, html.Length / 3);
string html2 = html.Substring(html.Length / 3, html.Length / 3);
string html3 = html.Substring(html.Length * 2 / 3); thread1 = new Thread(
delegate()
{
//if (this.Search(html1))
//{
// if (thread1.IsAlive) { thread1.Abort(); }
// if (thread2.IsAlive) { thread2.Abort(); }
// if (thread3.IsAlive) { thread3.Abort(); }
// return true;
//}
if (thread1.IsAlive) { thread1.Abort(); }
}
);为什么注释掉上面所示的那部分能通过编译呢 不注释掉 就这样错误 1 与“System.Threading.Thread.Thread(System.Threading.ThreadStart)”最匹配的重载方法具有一些无效参数 D:\作业\G7\MySpider\MySpider\Form1.cs 53 23 MySpider错误 2 参数“1”: 无法从“匿名方法”转换为“System.Threading.ThreadStart” D:\作业\G7\MySpider\MySpider\Form1.cs 54 17 MySpider
在线呢 谢谢!!!!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货