如何关闭c sharp.net文件夹中打开的文件 [英] How to close an opened file on the folder in c sharp.net

查看:139
本文介绍了如何关闭c sharp.net文件夹中打开的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含一些文件的文件夹。在该文件中,有些是为这些文件打开的,我如何关闭这些打开的文件。请让我知道。

解决方案

如果你打开文件,并假设你使用名为myFile的变量,然后你应该使用以下代码:



 myFile.Close(); 


I have a folder contains some file are available. In that file some are opened for these files how can i close these open files.Please let me know.

解决方案

If the file was opened by you, and assuming you use a variable named "myFile", then you should use the following code:

myFile.Close();


这篇关于如何关闭c sharp.net文件夹中打开的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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