简体   繁体   中英

What is the GetFullPath(String, String) overload?

The documentation of the Path.GetFullPath(String) method contains the following text (emphasis mine):

Important

If path is a relative path, this overload returns a fully qualified path that can be based on the current drive and current directory. [...] To return a deterministic path, call the GetFullPath(String, String) overload. [...]

I checked the documentation and IntelliSense, and I just can't find a GetFullPath overload that takes two parameters (.net 4.8, full classic framework). Is this a documentation bug (and maybe they meant Path.Combine(String, String) instead?) or did I miss something?

It was introduced in .NET Core 2.1 / .NET Standard 2.1. It seems that the docs website isn't clever enough to hide parts of the documentation which are only relevant to newer .NET versions.

See the docs for GetFullPath(String, String) here .

You can select which .NET Version to view the docs for in the top left:

docs.microsoft.com 版本选择器的屏幕截图

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM