作者热门文章
- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
假设我有一个定义为“....................\bin\prices.xls”的文件名,是否有一种简单的方法可以将其转换为完全限定路径(一个包括驱动器号、冒号和文件的所有文件夹)?
最佳答案
尝试 Path.GetFullPath() :
Returns the absolute path for the specified path string.
The absolute path includes all information required to locate a file or directory on a system.
关于c# - 如何将相对路径转换为 C#/.NET 中的完全限定路径?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2162292/
我是一名优秀的程序员,十分优秀!