Path.GetDirectoryName returns null on UNC path
Path.GetDirectoryName(@"C:\\");
returns null and
Path.GetDirectoryName(@"C:\\Foo");
returns C: \
Although this is exactly what the documentation mentions I am wondering why
Path.GetDirectoryName(@"\\server.domain.tld\Foo");
returns null, not as I expected \ server.domain.tld \
Does anyone know why?
+3
source to share