Read an array of 32bit ints from a binary format file?
<p>OK so I have converted a file into a binary format using BinaryWriter. The format is:</p>

<p>number of ints, followed by the ints.</p>

<p>So the code will be something like:</p>

<pre><code>readLineOfNumbers() {
    count = read();
    int[] a = read(count ints);
    return a;
}
</code></pre>

<p>Do I use a BinaryReader? The closest thing I can see there is to read everything into a byte[], but then how do I make that an int array? This all has to be done very efficiently as well. I need buffering and so on.</p>
