tags:

views:

65

answers:

2

What is C# analog of C fread()?

In C code here we use

fread(inbuf, 1, AUDIO_INBUF_SIZE, f);

What could be its exact analog?

+4  A: 

The closest would be Stream.Read

byte[] buffer = new byte[8192];
int bytesRead = stream.Read(buffer, 0, buffer.Length);
Jon Skeet