title: BinaryReader, reading by blocks, ArgumentException, Offset and length were out of bounds
body: <p>My stream has 1467 bytes, One block has 489 bytes, Address is 978 and I would like one block. So it is the last block in stream [from 978 to end of file]
  But I give this Exception: Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.</p>
  
  <p>But why ? from 978 to 1467 is 489 bytes, and I try read 489 bytes from 978, so Why this exception is throwed ?</p>
  
  <p>this is my code.</p>
  
  <pre><code>public List&lt;Block&lt;T&gt;&gt; ReadBlock(int address)
  {
      var result = new List&lt;Block&lt;T&gt;&gt;();
      using (var br = new BinaryReader(new FileStream(FilePath, FileMode.OpenOrCreate, FileAccess.Read),Encoding.Default))
      {
           var buffer = new byte[BlockSize];
           br.Read(buffer, address, BlockSize);
  
           if (buffer.Sum(item =&gt; item) == 0)
           {
              result.Add(new Block&lt;T&gt;());
           }
           else
           {
              var block = new Block&lt;T&gt;();
              block.Deserialize(buffer);
              result.Add(block);
           }
      }
      return result;
  }
  </code></pre>