1.我有一个路径\\\\ arvind \ chaudhary \ newfolder \想要删除两个后记 从这条路径斜线,并希望如下
2.我想要路径\\ arvind \ chaudhary \ newfolder \
答案 0 :(得分:2)
var str = @"\\\\arvind\chaudhary\newfolder\";
str = str.Replace(@"\\\\", @"\\");
返回
\\ Arvind的\乔杜里\ newfolder \
答案 1 :(得分:-1)
使用此,
string a = @"\\\\arvind\chaudhary\newfolder\";
a = a.Replace("\\\\", "\\");