How do i use a BinaryReader im getting error?
<p>I need ot read a binary file. But getting error. How can i do it ?
Im trying to explain what else can i write ?</p>

<pre><code>using System;
using System.IO;
using System.Net;
using System.Text;

namespace BinaryReader
{
    public partial class Form1 : Form1
    {

        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        public void R()
        {
            using (BinaryReader br = new BinaryReader(File.Open("file.bin", FileMode.Open)))
            {
                // 2.
                // Position and length variables.
                int pos = 0;
                // 2A.
                // Use BaseStream.
                int length = (int)b.BaseStream.Length;
                while (pos &lt; length)
                {
                    // 3.
                    // Read integer.
                    int v = b.ReadInt32();
                    Console.WriteLine(v);

                    // 4.
                    // Advance our position variable.
                    pos += sizeof(int);
                }
            }
        }
    }


}
</code></pre>

<p>On this line im getting error:</p>

<pre><code>using (BinaryReader br = new BinaryReader(File.Open("file.bin", FileMode.Open)))
</code></pre>

<p>Error 'BinaryReader' is a 'namespace' but is used like a 'type'</p>

<p>How can i fix it ?</p>
