Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Given a path and folder, returns the index of the substring in path relative to the folder. If the path is not under the folder then 0 is returned (meaning the entire path).
MakeRelative(@"$/src/project/abc.cpp", @"$/src") -> 6 MakeRelative(@"$/src/project/abc.cpp", @"$/specs") -> 0 MakeRelative(@"$/src/project/abc.cpp", @"$/src/proj") -> 0
Namespace: Microsoft.TeamFoundation.VersionControl.Common
Assembly: Microsoft.TeamFoundation.VersionControl.Common (in Microsoft.TeamFoundation.VersionControl.Common.dll)
Syntax
'Declaration
Public Shared Function GetRelativeStartIndex ( _
item As String, _
folder As String _
) As Integer
public static int GetRelativeStartIndex(
string item,
string folder
)
public:
static int GetRelativeStartIndex(
String^ item,
String^ folder
)
static member GetRelativeStartIndex :
item:string *
folder:string -> int
public static function GetRelativeStartIndex(
item : String,
folder : String
) : int
Parameters
- item
Type: System.String
folder
Type: System.StringFolder to make it relative to.
Return Value
Type: System.Int32
Index of relative path part in path.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.