Jon
Sun Jun 05 15:15:22 CDT 2005
Roby Eisenbraun Martins
<RobyEisenbraunMartins@discussions.microsoft.com> wrote:
> Which one is the fast way to open a file and read it. If possible
> without buffers and any other kind of conversion. I need one step from the
> harddisk to the Array.
>
> Right now I am using FileStream. Is this the best way?
There are always going to be buffers at some level, but using
FileStream is likely to be as fast as you'll get in .NET. Do you have
any evidence that file reading is the bottleneck in your application?
Have you worked out how much slower your use of FileStream is than the
theoretical maximum transfer rate of your disk?
--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too