1. FileStream.Write string filePath = Directory.GetCurrentDirectory() + "\\" + Process.GetCurrentProcess().ProcessName + ".txt"; if (File.Exists ...
C 写入文件的几种方式 Researcher 博客园.html https: www.cnblogs.com researcher p .html 网页内容保存: .FileStream.Write string filePath Directory.GetCurrentDirectory Process.GetCurrentProcess .ProcessName .txt if File.E ...
2020-04-12 14:54 0 2676 推荐指数:
1. FileStream.Write string filePath = Directory.GetCurrentDirectory() + "\\" + Process.GetCurrentProcess().ProcessName + ".txt"; if (File.Exists ...
...
...
C# winform写入和读取TXT文件 string str; str=this.textBox1.Text; StreamWriter sw = new StreamWriter(Application.StartupPath ...
读取: 1.使用StreamReader读取文件,然后一行一行的输出 StreamReader sr = new StreamReader(path,Encoding.Default); String line; while ((line = sr.ReadLine ...
...
写入: 读取: end ...
//简洁版 public static void AddLgoToTXT(string logstring) { string path = AppDomain.CurrentDomain.BaseDirectory + "operalog.txt ...