我得到的是使用最近的新的FileInfo(路径).FullPath
,但据我所知FileInfo的是文件而已,没有目录。
The closest I get is using new FileInfo(path).FullPath
, but as far as I know FileInfo is for files only, not directory.
另请参阅我的意见Jon飞碟双向的答案这里上下文。
See also my comments to Jon Skeet's answer here for context.
Path类还为您提供了很多很好的方法和属性,例如: GetFullPath()。请参见 MSDN 的所有细节。
The Path class also gives you a lot of nice methods and properties, e.g. GetFullPath(). See MSDN for all details.