摘要:
StreamWriter,用于向文件内写信息的类,如:
FileStream fs=new FileStream("test.txt",FileMode.OpenOrCreate);
StreamWriter sw=new StreamWriter(fs);
sw.WriteLine("Hello!!!");
sw.Close();
StreamReader,读取文件信息的类,如:
FileStream fs=new FileStream("test.txt",FileMode.Open);
StreamReader sr=new StreamReader(fs);
读出一行的信息:
String ss=sr.ReadLine();
sr.Close(); 阅读全文
摘要:
string a = "要显示的文本内容!而完全去掉HTML代码!";
string b = System.Text.RegularExpressions.Regex.Replace(a, "]+",""); 阅读全文