1
Answer

read from arabic file

Ask a question
huda omar

huda omar

12y
4.5k
1
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)