string file = "\\\\" + someServer + "\\" + someFile;
file = file.Replace(":\\","$\\");
And, if you do not want to use these characters to exit the threshold ...
string file = @"\\" + someServer + @"\" + someFile;
file = file.Replace(@":\",@"$\");
source
share