示例#1
0
 public FileName(string fileName)
 {
     if (fileName == null)
     {
         throw new ArgumentNullException("fileName");
     }
     if (fileName.Length == 0)
     {
         throw new ArgumentException("The empty string is not a valid FileName");
     }
     this.normalizedFileName = FileUtility.NormalizePath(fileName);
 }
 protected PathName(string path)
 {
     if (path == null)
     {
         throw new ArgumentNullException("path");
     }
     if (path.Length == 0)
     {
         throw new ArgumentException("The empty string is not a valid path");
     }
     this.normalizedPath = FileUtility.NormalizePath(path);
 }