when I try to read file which written in arabic format ,I get only last line ...what's the problem.
The code:
// Read the file and display it line by line in text box
System.IO.StreamReader file =
new System.IO.StreamReader("arabic.txt", Encoding.UTF8);
while ((line = file.ReadLine()) != null)
{
txtfile[count] = line;
textBox1.Text = txtfile[count]+Environment.NewLine;
count++;
}
file.Close();
Hemant KumarPosted Dec 11, 2011, 6:17 AM
you can try this
private void button1_Click(object sender, EventArgs e)
{
this.textBox1.RightToLeft = RightToLeft.Yes;
StreamReader myPage = new StreamReader(@"D:\Xml\ay7aga.txt",Encoding.Default);
string myPageString = myPage.ReadToEnd();
textBox1.Text = myPageString;
}
hope this helps