this.rtb_Content.Clear();
FileStream fs = new FileStream(this.txt_FilePath.Text, FileMode.Open, FileAccess.Read);
int n = (int)fs.Length;
byte[] b = new byte[n];
int r = fs.Read(b, 0, n);
fs.Close();
this.rtb_Content.Text = Encoding.UTF8.GetString(b, 0, n);
this.rtb_Content.Clear();
FileStream fs = new FileStream(this.txt_FilePath.Text, FileMode.Open, FileAccess.Read);
long n = fs.Length;
byte[] b = new byte[n];
int data, index;
index = 0;
data = fs.ReadByte();
while (data != -1)
{
b[index++] = Convert.ToByte(data);
data = fs.ReadByte();
}
fs.Close();
this.rtb_Content.Text = Encoding.UTF8.GetString(b);
this.rtb_Content.Clear();
this.rtb_Content.Text = File.ReadAllText(this.txt_FilePath.Text, Encoding.UTF8);
this.rtb_Content.Clear();
StreamReader sr = new StreamReader(this.txt_FilePath.Text, Encoding.UTF8);
string line = sr.ReadLine();
while (line != null)
{
this.rtb_Content.AppendText(line);
line = sr.ReadLine();
if (line != null)
{
this.rtb_Content.AppendText("\r\n");
}
}
sr.Close();
this.rtb_Content.Clear();
StreamReader sr = new StreamReader(this.txt_FilePath.Text, Encoding.UTF8);
this.rtb_Content.Text = sr.ReadToEnd();
sr.Close();
this.rtb_Content.Clear();
StreamReader sr = new StreamReader(this.txt_FilePath.Text, Encoding.UTF8);
while (!sr.EndOfStream)
{
this.rtb_Content.AppendText(sr.ReadLine());
if (!sr.EndOfStream)
{
this.rtb_Content.AppendText("\r\n");
}
}
sr.Close();
this.rtb_Content.Clear();
FileStream fs = new FileStream(this.txt_FilePath.Text, FileMode.Open, FileAccess.Read);
StreamReader sr = new StreamReader(fs, Encoding.UTF8);
this.rtb_Content.Text = sr.ReadToEnd();
fs.Close();
sr.Close();