更新:2007 年 11 月
将一个基路径和一个相对路径进行组合。
Public Shared Function Combine ( _ basePath As String, _ relativePath As String _ ) As String
Dim basePath As String Dim relativePath As String Dim returnValue As String returnValue = VirtualPathUtility.Combine(basePath, _ relativePath)
public static string Combine( string basePath, string relativePath )
public: static String^ Combine( String^ basePath, String^ relativePath )
public static String Combine( String basePath, String relativePath )
public static function Combine( basePath : String, relativePath : String ) : String
基路径。
相对路径。
组合后的 basePath 和 relativePath。
relativePath 是一个物理路径。
- 或 -
relativePath 包含一个或多个冒号。
relativePath 为 nullNothingnullptrnull 引用(在 Visual Basic 中为 Nothing) 或空字符串。
basePath 为 nullNothingnullptrnull 引用(在 Visual Basic 中为 Nothing) 或空字符串。
如果相对路径恰为一个代字号 (~),则 Combine 方法返回 AppDomainAppVirtualPath 属性的值。
如果相对路径以一个代字号后跟一个正斜杠 (~/) 开头,则 Combine 方法使用 AppDomainAppVirtualPath 属性值而非基路径;否则 Combine 方法将使用基路径。
Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98