Array of MemoryStream

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to have an array of MemoryStream?

MemoryStream[] memStr = new MemoryStream[10];

It seems to allow me to compile this but crashes when I try to do anything
with memStr.
 
Mimi said:
Is it possible to have an array of MemoryStream?

MemoryStream[] memStr = new MemoryStream[10];

It seems to allow me to compile this but crashes when I try to do anything
with memStr.

Should work no problem. You will need to set each item in the array to a new
MemoryStream. Your "new MemoryStream[10]" creates a new array but each item
in the array is null. It's a good idea to give the error message, "crashes"
doesn't give ppl much to go on.

Michael
 
Back
Top