Delen via


VersionControlPath.GetCommonParent Method

Given two server paths, returns the farthest item from $/ that parents both items.

If one of the two paths is null, the other will be returned.

If both paths are null, an ArgumentNullException is thrown.

Namespace:  Microsoft.TeamFoundation.VersionControl.Common
Assembly:  Microsoft.TeamFoundation.VersionControl.Common (in Microsoft.TeamFoundation.VersionControl.Common.dll)

Syntax

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

Parameters

Return Value

Type: System.String
The farthest item from $/ that parents both path1 and path2.

.NET Framework Security

See Also

Reference

VersionControlPath Class

Microsoft.TeamFoundation.VersionControl.Common Namespace