读书人

目录下是否存在某个文件,该如何处理

发布时间: 2012-02-06 15:52:45 作者: rapoo

目录下是否存在某个文件
我想在一个文件夹下,看看是否存在一个EXE文件
不知道怎么实现

[解决办法]
System.IO.File.Exists(path)
[解决办法]
using System.IO;
using System.Windows.Forms;
if(File.Exists(filename))
{
MessageBox.Show( "the file exists ");
}

读书人网 >C#

热点推荐