A couple of stream questions

This is a discussion on A couple of stream questions within the C# Programming forums, part of the General Programming Boards category; 1. How can I convert a memorystream/filestream to a stream? 2. How to create an array of streams? AK...

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

    A couple of stream questions

    1. How can I convert a memorystream/filestream to a stream?
    2. How to create an array of streams?

    AK

  2. #2
    Anti-Poster
    Join Date
    Feb 2002
    Posts
    1,399
    Quote Originally Posted by AngKar
    1. How can I convert a memorystream/filestream to a stream?
    Both MemoryStream and FileStream inherit from Stream. You can use either class where you can use a Stream.
    Quote Originally Posted by AngKar
    2. How to create an array of streams?
    Code:
    //An array of five streams
    Stream[] streams = new Stream[5];
    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

  3. #3
    Registered User
    Join Date
    Dec 2005
    Posts
    141
    So is this valid? I want to do something like this....

    Code:
     public Stream getStream(Stream stream)
     {
      MemoryStream ms;
       .
       .
       .
      retrun ms;
     }

  4. #4
    Anti-Poster
    Join Date
    Feb 2002
    Posts
    1,399
    Yup.
    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

  5. #5
    Registered User
    Join Date
    Dec 2005
    Posts
    141
    Thanks Piano

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Couple of questions about XOR linked lists...
    By klawson88 in forum C Programming
    Replies: 5
    Last Post: 04-19-2009, 04:55 PM
  2. a couple of questions about System.String
    By Elkvis in forum C# Programming
    Replies: 5
    Last Post: 02-17-2009, 01:48 PM
  3. A couple of Basic questions
    By ozumsafa in forum C Programming
    Replies: 8
    Last Post: 09-26-2007, 04:06 PM
  4. Couple of Questions
    By toonlover in forum Windows Programming
    Replies: 10
    Last Post: 07-14-2006, 01:04 AM
  5. couple questions for newb
    By bluehead in forum C++ Programming
    Replies: 10
    Last Post: 11-24-2001, 02:32 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21