Published in: VB.NET
Private Function GetStreamAsByteArray(ByVal stream As System.IO.Stream) As Byte() Dim streamLength As Integer = Convert.ToInt32(stream.Length) Dim fileData As Byte() = New Byte(streamLength) {} ' Read the file into a byte array stream.Read(fileData, 0, streamLength) stream.Close() Return fileData End Function
You need to login to post a comment.
