EnsureRelativePath(string path) Method

Throws an exception if the specified path is not a relative path, or if the path contains . or .. path elements.

Syntax

protected static void EnsureRelativePath(string path)

Parameters

path
Type: string

Path to verify.

Exceptions

System.ArgumentException

Path is invalid.