internal void CheckPath (string path)
{
if (path == null)
throw new ArgumentNullException ("path");
if (path.Length == 0)
throw new ArgumentException ("An empty file name is not valid.");
if (path.IndexOfAny (Path.InvalidPathChars) != -1)
throw new ArgumentException ("Illegal characters in path.");
}