BinaryReader.Read(byte[], int, int);

- first parameter is the buffer to write into
- second parameter is the starting offset
- third parameter is the number of bytes to read

> -----Original Message-----
> From: dotnet discussion [mailto:[EMAIL PROTECTED]] On Behalf
Of
> Jeff Roberts
> Sent: Wednesday, April 17, 2002 1:58 PM
> To: [EMAIL PROTECTED]
> Subject: [DOTNET] BinaryReader Question
>
> I want to read X bytes from a file with BinaryReader into an offset
within
> a Byte array. Can this be done, or do I have to move the data after
> reading it ?
>
> Ex:
>
> private BinaryReader reader;
> private byte[] Buffer = new Byte[512];
>
> I don't see any BinaryReader methods that allow me to read the data
into a
> specific byte location within an existing Byte array ! i.e. I want to
read
> up to 500 bytes into Buffer starting at Buffer[11].
>
> thank you
>
> You can read messages from the DOTNET archive, unsubscribe from
DOTNET, or
> subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to