File Reading Problem in c#

this is how my data in txt file is:
1--2--3--
3-4-4-5--
-7-3-4---
7--5--3-6
--7---4--
3-2--4-5-
------3--
2-6--7---
4---4--3-
is my c# code to do file reading:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
public void populate_grid_by_file()
        {
            int counter = 0;
            string line;

            // Read the file and display it line by line.
            System.IO.StreamReader file =
               new System.IO.StreamReader("data.txt");
            for (int i = 0; i < Sodoku_Gri.GetLength(0); i++)
            {
                while ((line = file.ReadLine()) != null)
                {
                    for (int j = 0; j < Sodoku_Gri.GetLength(1); j++)
                    {
                        Console.Write(line[j].ToString());

                    }
                    Console.WriteLine(line);
                    counter++;
                }
            }
            file.Close();
            // Suspend the screen.
            Console.ReadLine();
        }


and this is how am printing my array:
1
2
3
4
5
6
7
8
9
10
11
12
13
public void display_grid()
        {
            for (int row = 0; row < Sodoku_Gri.GetLength(0); row++)
            {
                for (int col = 0; col < Sodoku_Gri.GetLength(1); col++)
                {

                    Console.Write(Sodoku_Gri[row, col]);
                    Console.Write("  ");
                }
                Console.WriteLine();
            }
        }

but when i display my array: my output is like:


1--2--3--1--2--3--
3-4-4-5--3-4-4-5--
-7-3-4----7-3-4---
7--5--3-67--5--3-6
--7---4----7---4--
3-2--4-5-3-2--4-5-
------3--------3--
2-6--7---2-6--7---
4---4--3-4---4--3-


cnt understand why duplication! help!
Topic archived. No new replies allowed.