Share via


Combine Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Combines two strings into a path.

Namespace:  System.IO
Assembly:  System.IO (in System.IO.dll)

Syntax

'Declaration
Public Shared Function Combine ( _
    path1 As String, _
    path2 As String _
) As String
public static string Combine(
    string path1,
    string path2
)
public:
static String^ Combine(
    String^ path1, 
    String^ path2
)
static member Combine : 
        path1:string * 
        path2:string -> string 
public static function Combine(
    path1 : String, 
    path2 : String
) : String

Parameters

Return Value

Type: System. . :: . .String
The combined paths. If one of the specified paths is a zero-length string, this method returns the other path. If path2 contains an absolute path, this method returns path2.

.NET Framework Security

See Also

Reference

Path Class

System.IO Namespace