Click or drag to resize
PathIsPathRooted Method
Gets a value indicating whether the specified path string contains a root.

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public static bool IsPathRooted(
	string path
)

Parameters

path
Type: SystemString
The path to test.

Return Value

Type: Boolean
true if path contains a root; otherwise, false.
Exceptions
ExceptionCondition
ArgumentExceptionpath contains one or more of the invalid characters defined in GetInvalidPathChars.
See Also