c# - How to pull the server name from a UNC -
Can anyone tell me how to pull the name of the server from the UNC?
ex.
// servername / directory / directory
EDIT: I'm sorry, but it seems that I need to clarify the mistake: the path is actually more like:
// servername / d $ / directory
I know that it can change some things
how URI
:
Uri Yuri = new ury (@ "\\ servername \ D $ \ directory "); String [] segs = uri.Segments; String s = "http: //" + Uuri.Host + "/" + string.Join ("/", segs, 2, segs.Length - 2) + "/";
Comments
Post a Comment