Can I create an array of memorystreams of flexible size?
Printable View
Can I create an array of memorystreams of flexible size?
Yes and no. Ask yourself if you need the indices into the collection to remain constant when elements are inserted or removed. If you do, you should use a Dictionary<int, MemoryStream>. If you don't, you should use a List<MemoryStream>. The difference is that you can call List.ToArray() to convert the List into a fixed array of MemoryStreams, while you have to code up something to do that for the Dictionary.