本文介绍了在VB.NET中存在文件存在的问题检查的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在检查文件是否存在以下代码;
Hi, I''m checking if a file exists with the following code;
展开 | 选择 | Wrap | 行号 推荐答案它总是说假的原因是文件不存在,知道原因吗?因为你有一个\t,这意味着在这里放一个标签字符。 这很容易错过。 这样做: The reason it always says false is that the file doesn''t exist, know why? Because you have a \t in there, which means "put a tab character here". It''s an easy miss. Do this: 展开 | 选择 | Wrap | 行号
它总是说错的原因是文件没有''存在,知道为什么吗?因为你有一个\t,这意味着在这里放一个标签字符。 这很容易错过。 这样做: The reason it always says false is that the file doesn''t exist, know why? Because you have a \t in there, which means "put a tab character here". It''s an easy miss. Do this: 展开 | 选择 | Wrap | 行号
我认为它是*您的*特定环境。我使用vs2005并复制粘贴该代码,它工作正常。 告诉我文件不存在,然后我创建文件,它告诉我它确实存在。 你确定文件确实存在吗? I think it is *your* specific environment. I use vs2005 and copy pasted that code and it worked correctly. Told me file didn''t exist, then I create the file and it told me it did exist. Are you SURE the file actually exists?
更多推荐
在VB.NET中存在文件存在的问题检查
发布评论