开发者

VB.NET code for running multiple threads

How to I run multiple threads in VB.NET?

Say I need 2 threads - one that prints 100 numbe开发者_StackOverflow中文版rs in a loop and the second one that asks for the user's name and prints it inside a message box.


I would use 2 BackgroundWorker objects one for each operation that you want to execute. Using the background workers ProgressChanged event will ensure that you don't need to marshal the results back to the UI as the BackgroundWorker already takes care of this for you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜