C# richtextbox內容儲存成文字檔
C# richtextbox內容儲存成文字檔
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; namespace SYWEB_SYDServer { public partial class Form1 : Form { public { InitializeComponent(); } private { MessageBox.Show(“message load”); this.richTextBox_base1.Text this.richTextBox_base1.Text this.richTextBox_base1.Text this.richTextBox_base1.Text this.richTextBox_base1.Text this.richTextBox_base1.Text this.richTextBox_base1.Text this.richTextBox_base1.Text this.richTextBox_base1.Text this.richTextBox_base1.Text MessageBox.Show(“”+this.richTextBox_base1.Lines.Length); string[] string[] Array.Copy(sLines, richTextBox_base1.Lines = StreamWriter int foreach { if { sw.WriteLine(“”); } sw.Write(element);// 寫g入J文a字r index++; } sw.Close();// 關o閉?串e流y } } } |