C# 判断文件名中是否有非法字符

if (string.IndexOfAny(System.IO.Path.GetInvalidFileNameChars()) >= 0)
{
    
//含有非法字符
}
posted @ 2011-07-08 17:04  一修先生  阅读(1136)  评论(1)    收藏  举报