相关疑难解决方法(0)

为什么Path.Combine没有正确连接以Path.DirectorySeparatorChar开头的文件名?

从Visual Studio中的立即窗口:

> Path.Combine(@"C:\x", "y")
"C:\\x\\y"
> Path.Combine(@"C:\x", @"\y")
"\\y"
Run Code Online (Sandbox Code Playgroud)

它们似乎都应该是一样的.

旧的FileSystemObject.BuildPath()没有以这种方式工作......

.net c# file

173
推荐指数
9
解决办法
8万
查看次数

标签 统计

.net ×1

c# ×1

file ×1