gpt4 book ai didi

c# - 找不到文件,但文件在那里!

转载 作者:行者123 更新时间:2023-12-02 01:20:27 25 4
gpt4 key购买 nike

public static List<Product> Load(string filename)
{
if (!File.Exists(filename))
{
throw new FileNotFoundException("Data could not be found ", filename );
}
}

Visual Studio 2010 出现以下异常“FileNotFoundException”

嗯..好吧。这个问题似乎已经解决了。

.

但是,我仍然找不到该文件!但文件就在那里,在同一目录中,我已经验证并双重验证了名称是否正确!我不知道发生了什么。

该文件名为“Products.xml”。

最佳答案

你是抛出异常的人。您的意思是显示错误消息吗?

关于c# - 找不到文件,但文件在那里!,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5475265/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com