[問題] 寫入檔案的問題
部份程式碼如下:
private void button2_Click(object sender, EventArgs e)
{
StreamWriter write = new StreamWriter("TestFile.txt");
write.Write(textBox1.ToString());
write.Write(textBox2.ToString());
write.Write(textBox3.ToString());
write.Close();
textBox3.Text = "";
}
現在問題來了..
小弟我開啟TestFile.txt後
發現存入字串的前面會多"System.Windows.Forms.TextBox, Text:"這行文字
請問各位大大怎麼把這行文字拿掉呢??
感謝大家
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.128.101.108
→
06/02 00:49, , 1F
06/02 00:49, 1F
→
06/02 00:57, , 2F
06/02 00:57, 2F