62,041
社区成员
发帖
与我相关
我的任务
分享
string filename = tVS.Nodes[r].Text;
foreach(char c in System.IO.Path.GetInvalidFileNameChars()) {
filename = filename.Replace(c, '_');
}
代码来自
http://stackoverflow.com/questions/10898338/c-sharp-string-replace-to-remove-illegal-characters