title: UNC path does not work with .NET?
body: <p>I am running a very simple program, which is trying to list files in a folder on the same machine, which is specified using UNC format(as described in <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx</a>):</p>
  
  <p><pre><code>
  static string rootDir = @"\\?\d:\share\input";</p>
  
  static void Main(string[] args)
  {
      char[] invlidChars = Path.GetInvalidPathChars();
      foreach (char invChar in invlidChars)
      {
          if (rootDir.Contains(invChar.ToString()))
          {
              Console.WriteLine("InvChar - {0}", invChar);
          }
      }
      string[] matchFiles = Directory.GetFiles(rootDir);
  }
  </code></pre>
  
  <p></p>
  
  <p>However the Directory.GetFiles() does not work and throws an ArgumentException(which is thrown when - <em>path is a zero-length string, contains only white space, or contains one or more invalid characters as defined by InvalidPathChars.</em>). The Console.Writeline() does not print anything, which confirms that there are no invalid chars in the path. I get the same exception when I use 
  "\\UNC\?\d:\share\input" or 
  "\\UNC\?\machinename\share\input" or 
  "\\?\machinename\share\input". </p>
  
  <p>The "d:\share\input" is indeed a shared folder. </p>
  
  <p>Does anybody know what could be wrong? </p>
  
  <p>Thanks!</p>