简体   繁体   English

什么是 GetFullPath(String, String) 重载?

[英]What is the GetFullPath(String, String) overload?

The documentation of the Path.GetFullPath(String) method contains the following text (emphasis mine): Path.GetFullPath(String) 方法的文档包含以下文本(强调我的):

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.如果path是相对路径,则此重载将返回可以基于当前驱动器和当前目录的完全限定路径。 [...] To return a deterministic path, call the GetFullPath(String, String) overload. [...] 要返回确定性路径,请调用GetFullPath(String, String)重载。 [...] [...]

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).我检查了文档和 IntelliSense,只是找不到带有两个参数的 GetFullPath 重载(.net 4.8,完整的经典框架)。 Is this a documentation bug (and maybe they meant Path.Combine(String, String) instead?) or did I miss something?这是一个文档错误(也许他们的意思是Path.Combine(String, String) ?)还是我错过了什么?

It was introduced in .NET Core 2.1 / .NET Standard 2.1.它是在 .NET Core 2.1 / .NET 标准 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.似乎文档网站不够聪明,无法隐藏仅与较新的 .NET 版本相关的文档部分。

See the docs for GetFullPath(String, String) here . 在此处查看GetFullPath(String, String)的文档

You can select which .NET Version to view the docs for in the top left:您可以 select 哪个 .NET 版本查看左上角的文档:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 没有DateTime?.ToString(string)重载? - No DateTime?.ToString(string) overload? NLog LogManager.GetLogger(String,Type)重载的目的是什么 - What is the purpose of NLog LogManager.GetLogger(String, Type) overload String.Join重载无法识别 - String.Join overload not recognized 字符串连接+字符串连接的运算符在哪里? - Where does string overload + operator for string concatenation? 尝试在字符串上重载运算符时收到错误 - Receiving error on attempt to overload operator on string 具有字符串参数的构造函数和具有object参数的相同重载 - Constructor with string parameter and identical overload with object parameter GetFullPath(".") 和 Directory.GetCurrentDirectory() 有什么区别? - What's the difference between GetFullPath(".") and Directory.GetCurrentDirectory()? 如何使用IDictionary扩展HtmlHelper <string, object> 超载? - How to extend the HtmlHelper with the IDictionary<string, object> overload? System.String不会重载operator + =但是String Concatenation有效,怎么样? - System.String does not overload operator += But String Concatenation works, How? IIS 7.x,添加启用HTTPS的站点:SiteCollection.Add(string,string,string,byte [])重载 - IIS 7.x, adding an HTTPS-enabled site: SiteCollection.Add(string, string, string, byte[]) overload
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM