huda omar

huda omar

  • NA
  • 6
  • 9.2k

read from arabic file

Dec 11 2011 4:56 AM
hi all 
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();

Answers (1)