C#輸出結(jié)果導(dǎo)出到一個Txt文檔程序為class Program { static void Main(string[] args) { string strA = new StreamReader(@"c:\a.txt", Encoding.UTF8).ReadToEnd();//a.txt內(nèi)容 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 關(guān)注
- 1345 瀏覽
添加回答
舉報
0/150
提交
取消