What is the best way to write a binary representation of an int ( Int32[]) array in Stream?
Stream.Writeaccepts only byte[]as a source, and I would like to avoid converting / copying the array to byte[](an array, but instead streaming directly from the "source location").
In a more system-oriented language (aka C ++), I just passed an int array to byte*, but as I understand it, this is not possible with C # (and moreover, casting byte*in byte[]will not work anyway)
thank
Martin
PS: In fact, I would also like to convey single values int. Does the BinaryConverter.GetBytes()new byte array use? In this case, I’ll talk about how to efficiently pass single values int...
source
share