开发者

How do I convert a relative path to a fully qualified path in C# / .NET?

开发者 https://www.devze.com 2022-12-18 06:42 出处:网络
Let\'s say I have a file name defined as \"..............\\bin\\prices.xls\", is there a simple way to convert that to a fully qualified path (one that includes the Drive letter, colon and all folders

Let's say I have a file name defined as "..............\bin\prices.xls", is there a simple way to convert that to a fully qualified path (one that includes the Drive letter, colon and all folders to the 开发者_Python百科file)?


Try 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消