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 { /* this.richTextBox_base1.Text = this.richTextBox_base1.Text string[] sLines = string[] sNewLines = Array.Copy(sLines, 0, StreamWriter sw = new int index = 0; foreach (string { if (index > 0) { } index++; } sw.Close();// 關o閉?串e流y */ StreamReader while { string richTextBox_base1.Text = } sr.Close();// 關o閉?串e流y string[] string[] Array.Copy(sLines, richTextBox_base1.Lines = } } } |