Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

Path.Combine w/ UNC Root

$
0
0

I am trying to combine two paths using System.IO.Path.Combine(str1, str2) but it's not working. Here is my code:

Dim str1 as string = "\\server1\share"

Dim str2 as string = "filenotfound.jpg"

Dim path as string = System.IO.Path.Combine(str1, str2)

 

Path is always equal to str2. For some reason Path.Combine() doesn't work with UNC filenames. Is there a built-in function that can combine a filename with a UNC root?


Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>