What is the C # analog of C fread ()?

What is the C # analog of C fread ()?

The C code that we use

fread(inbuf, 1, AUDIO_INBUF_SIZE, f);

What could be its exact counterpart?

+3
source share
2 answers

The closest will be Stream.Read

byte[] buffer = new byte[8192];
int bytesRead = stream.Read(buffer, 0, buffer.Length);
+6
source

Source: https://habr.com/ru/post/1756192/


All Articles