Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

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;
  }
 
PREVIOUS NEXT
Tagged: #stream #byte #array
ADD COMMENT
Topic
Name
7+8 =