C# txt文件的讀取與寫入
...
...
=open.FileName; } //傳入txt文件路徑參數 讀取txt文件所有 ...
...
txt文件中的格式: xxxxxx,xxxx xxxxxx,xxxx ...
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 ...