标签:
1 string FilterfileName(string strName) 2 { 3 string result=string.Empty ; 4 if (string.IsNullOrWhiteSpace(strName)) 5 { 6 //do something 7 } 8 else 9 { 10 result = strName.Replace("\\", "_").Replace("/", "_").Replace(":", "_") 11 .Replace("*","_").Replace("?","_").Replace("<","_") 12 .Replace(">","_").Replace("|","_").Replace("\"","_"); 13 } 14 return result; 15 }
标签:
原文地址:http://www.cnblogs.com/lovecsharp094/p/5427095.html