程序为
class Program
{
static void Main(string[] args)
{
string strA = new StreamReader(@"c:\a.txt", Encoding.UTF8).ReadToEnd();//a.txt内容
string strB = new StreamReader(@"c:\b.txt", Encoding.UTF8).ReadToEnd();//b.txt(过滤词)
string[] filtStr = strB.Split(',');
for (int i = 0; i < filtStr.Length; i++)
{
strA = strA.Replace(filtStr[i], "***");
}
Console.WriteLine(strA);
Console.ReadKey();
}
}
}
谢谢 !!!
慕虎7371278
相关分类