测试时文件数量少没发现问题,用的时候由于处理上百万的文件,进程后来非常多,而且到最后提示无法调用的exe,请问有什么好的解决办法
foreach (FileInfo NextFile in fileInfo)
{
runOne();
} private void runOne()
{
string binStr = "a.exe";
string argu = " -0"
Process exep = new Process();
exep.StartInfo.FileName = binStr;
exep.StartInfo.Arguments = argu;
exep.StartInfo.CreateNoWindow = true;
exep.StartInfo.UseShellExecute = false;
exep.Start(); }
C#Process
foreach (FileInfo NextFile in fileInfo)
{
runOne();
} private void runOne()
{
string binStr = "a.exe";
string argu = " -0"
Process exep = new Process();
exep.StartInfo.FileName = binStr;
exep.StartInfo.Arguments = argu;
exep.StartInfo.CreateNoWindow = true;
exep.StartInfo.UseShellExecute = false;
exep.Start(); }
C#Process
解决方案 »
- datagridview列头浮动
- DataGridView编辑的问题
- 看了一篇文章,说有a,b两个字符串,问,a字符串里是否有b字符串里的所有字符。
- VS2005中如何获取GridView中隐藏列的值
- dataGridView1自动定位
- 如何多表查询后显示在DataGridView中
- 连续问几个问题之三:我想让listbox的数据源来自一个web站点。怎么设计比较好?
- 既是博客,又有论坛功能的程序有没有?
- c#操作导入excel,如何设置列的格式?
- 卖血求救,各位大吓帮帮忙啊!关于网站服务器和C#客户端的通讯
- ~~~~C#无法引用Java写的 ashx接口?
- 【100分】求算法,在线等,大侠们帮帮忙啊啊~~~
我加了一句exep.WaitForExit();
这样不出问题了。就一个进程。但效率也低了很多。