从Visual Studio中的立即窗口:
> Path.Combine(@"C:\x", "y") "C:\\x\\y" > Path.Combine(@"C:\x", @"\y") "\\y"
它们似乎都应该是一样的.
旧的FileSystemObject.BuildPath()没有以这种方式工作......
.net c# file
.net ×1
c# ×1
file ×1