以下是引用片段: --------------- 1.read Text file try { FileStream fs = new FileStream(@"c:\test.txt", FileMode.Open, FileAccess.Read); StreamReader sr = new StreamReader(fs); string curLine; while( (curLine = sr.ReadLine()) != null ) { } sr.Close(); } catch { } 2.Write Text File try |