byte[] input = new byte[] {2, 4, 5, 2, 1}; ByteBuffer bytebuf = ByteBuffer.wrap(input);
ByteBuffer.wrap(byte[] array) method makes the buffer and the array interconnected, changes in the buffer result in the array changing and vice versa.
The equivalent of ByteBuffer in C # is memystream. But I do not know how to connect memystream with array ByteBuffer.wrap() method.
Can anyone say what is equivalent to ByteBuffer.wrap() in C #? I searched everywhere, but could not find the answer at all.
Thanks in advance.
source share