如何在运行多线程时修复错误 [英] How to fix error when run multi thread

查看:103
本文介绍了如何在运行多线程时修复错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有代码:



I have code:

ThreadStart start = new ThreadStart(Temp);
arrayThread[i] = new Thread(start);

arrayThread[i].Start();





但是当我构建时:错误:





but when i build: error:

A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available.





帮助我!!!



help me!!!

推荐答案

您的报告不正确。该项目无法建立。因此,您无法观察到导致程序无法正常工作的问题...消息。



代码无法构建,因为在第二行中左右部分具有不同的赋值不兼容类型,左边是某个元素类型的元素数组,右边部分的类型是 System.Threading.Thread 。一切都没有意义。



-SA
Your report is not true. The project cannot build. Therefore, you could not observe "A problem caused the program to stop working correctly…" message.

The code cannot build because, in second line, left and right parts are of different assignment-incompatible type, left is the array of elements of some element type, right part's type is System.Threading.Thread. It all makes no sense at all.

—SA


这篇关于如何在运行多线程时修复错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆