I have a method which returns a array of ByteArray:
public byte[][] Draw(ImageFormat imageFormat, ImageSize imageSize);
and I need to write it into a MemoryStream
:
var byteArray = instanceName.Draw(ImageFormat.Jpeg, ImageSize.Dpi150);
MemoryStream ms = new MemoryStream(byteArray[0]);
This is working so far because the array of byteArray only ever has one element. Would someone be able to point out and provide a solution on : what would happen if the array of byteArray has more than one element?
I guess with current code I would still take the first element of the byteArray and discard the rest, but I need MemoryStream
and it can not take a multi-dimensional array.