C# MemoryStream zu Byte -Array
byte[] byteArray = memoryStream.ToArray()
spindisc
byte[] byteArray = memoryStream.ToArray()
Memory stream to byte array
public static byte[] ReadFully(Stream input)
{
using (MemoryStream ms = new MemoryStream())
{
input.CopyTo(ms);
return ms.ToArray();
}
}