sách gpt4 ăn đã đi

c# - 为什么 FileInfo 构造函数得到 “The path is not of a legal form”?

In lại 作者:太空狗 更新时间:2023-10-29 20:12:12 26 4
mua khóa gpt4 giày nike

我们使用以下代码在 C# 中创建一个 FileInfo 对象:

if (planConfig->OrganisationsFilePath != nullptr)
{
FileInfo^ file = gcnew FileInfo(planConfig->OrganisationsFilePath);
//Do some stuff here
}

并且我们的客户报告说他们看到了一个 ArgumentException 并抛出了“路径不是合法形式”的消息。我们无法重现此错误,我们想知道您需要将什么字符串传递给 FileInfo 构造函数才能看到此错误?

câu trả lời hay nhất

路径可能包含无效字符。查看MSDN documentation on FileInfo constructor .

ArgumentException:The file name is empty, contains only white spaces, or contains invalid characters.

关于c# - 为什么 FileInfo 构造函数得到 “The path is not of a legal form”?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1158293/

26 4 0
Chứng chỉ ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com
Xem sitemap của VNExpress