该进程无法访问该文件,因为它正被另一个进程使用... [英] the process cannot access the file '' because it is being used by another process...

查看:194
本文介绍了该进程无法访问该文件,因为它正被另一个进程使用...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个程序可以下载远程XML文件中指定的一组缩略图。最多可以下载30个缩略图。我正在使用foreach循环遍历所有< item>的XmlNodeList。在XML文件和foreach循环内部的标签我开始运行downloadThumb方法的新Thraed。这是我的downloadThumb方法:

I''ve got a program that downloads a set of thumbnail images specified in a remote XML file. There can be up to 30 thumbnails downloaded. I''m using a foreach loop iterating through an XmlNodeList of all the <item> tags in the XML file and inside that foreach loop I start a new Thraed that runs the downloadThumb method. Here is my downloadThumb method:

展开 | 选择 | Wrap | 行号

推荐答案

如果打开图像或位图来自文件的对象,它被视为正在使用的文件
If you open an Image or Bitmap object from a file, it counts as the file being in use


我们可以看到用于从本地硬盘打开缩略图的代码吗?


我猜你正在使用一个将拇指加载到列表或数组中的循环。

Can we see the code that you use to open the thumbnails from the local harddrive?

I''m going to guess that you are using a loop that loads the thumbs into a list or array.

展开 | 选择 | Wrap | 行号


这是解析所有<的所有过程; item>从XML到outach循环结束,包括加载位图。

Here is the entire process from parsing all the <item>''s out of the XML up to the end of the foreach loop, which includes loading the bitmap.

展开 | 选择 | 换行 | 行号


这篇关于该进程无法访问该文件,因为它正被另一个进程使用...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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