C#输出结果导出到一个Txt文档程序为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(); } }}谢谢 !!!
- 1 回答
- 0 关注
- 1284 浏览
添加回答
举报
0/150
提交
取消