标签:system progress display main string cto coding ring alt
敏感词匹配
1 string[] strs2 = File.ReadAllLines(System.AppDomain.CurrentDomain.BaseDirectory + @"Files\Cache\SensitiveWords.txt", Encoding.UTF8); 2 List<string> sensitiveWords = new List<string>(strs2); 3 bool havaSensitiveWord = false; 4 foreach (string str in sensitiveWords) 5 { 6 if (progress_content.Contains(str)) 7 { 8 havaSensitiveWord = true; 9 break;//只要包含一个,跳出foreach循环 10 } 11 }
标签:system progress display main string cto coding ring alt
原文地址:http://www.cnblogs.com/tylerflyn/p/8011128.html