问题描述
C#原代码:ThreadStartthreadStart=newThreadStart(base.Connecting);threadStart+=newThreadStart(base.Run);sThread=newThread(threadStart);sThread.Start();翻译成VB.net代码:DimthreadStartasNewThreadStart(AddressofMybase.Connecting)threadStart+=NewThreadStart(AddressofMybase.Run)sTread=NewThread(threadStart)sThread.Start()这段代码是转换工具生成的.但在VS2005中编辑,"threadStart+=NewThreadStart(AddressofMybase.Run)"会出现"没有为类型'System.Threading.ThreadStart'和'System.Threading.ThreadStart'定义运算符'+'"如果改成这样:DimthreadStartasNewThreadStart(AddressofMybase.Connecting)DimthreadStart2asNewThreadStart(AddressofMybase.Run)dimsThread2asThreadsTread=NewThread(threadStart)sTread2=NewThread(threadStart2)sThread.Start()sThread2.Start()和原代码有什么区别?请高手帮忙解答!!
解决方案
解决方案二:
同样关注,帮顶
时间: 2024-11-05 16:40:13