摘要:
C#快速剔除字符串中不合法的文件名stringstrFileName="文件名称";StringBuilder rBuilder =newStringBuilder(strFileName);foreach(charrInvalidCharinPath.GetInvalidFileNameChars()) rBuilder.Replace(rInvalidChar.ToString(),string.Empty);C#快速剔除字符串中不合法的文件路径字符stringrPath ="路径";StringBuilder rBuilder =newString 阅读全文