Thread: memorystream query

  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    141

    memorystream query

    Can I create an array of memorystreams of flexible size?

  2. #2
    Anti-Poster
    Join Date
    Feb 2002
    Posts
    1,401
    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.
    If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. query problem
    By arian in forum C# Programming
    Replies: 1
    Last Post: 08-18-2008, 01:49 PM
  2. memorystream to java.io.ByteArrayOutputStream
    By AngKar in forum Tech Board
    Replies: 3
    Last Post: 06-06-2006, 11:50 AM
  3. Getting type
    By AngKar in forum C# Programming
    Replies: 3
    Last Post: 05-26-2006, 09:06 AM
  4. DNS Query
    By Simpsonia in forum Networking/Device Communication
    Replies: 1
    Last Post: 04-24-2006, 12:42 AM
  5. dns query
    By bulldog in forum C Programming
    Replies: 6
    Last Post: 02-24-2004, 10:44 AM