Answers for "memory stream to byte c#"

C#
1

stream to byte array c#

public static byte[] GetBytes(Stream stream)
  {
   	var bytes = new byte[stream.Length];
   	stream.Seek(0, SeekOrigin.Begin);
   	stream.ReadAsync(bytes, 0, bytes.Length);
   	stream.Dispose();
   	return bytes;
  }
Posted by: Guest on November-25-2021
2

c# memorystream to byte array

byte[] byteArray = memoryStream.ToArray()
Posted by: Guest on August-03-2020

C# Answers by Framework

Browse Popular Code Answers by Language