Java uses SequenceInputStream class to combine two or more streams into one single stream. I would like to know how someone can merge two or more streams in one stream in C# language.This is what i want to do in C# I have a NetworkStream nS1. From nS1 i created another Networkstream nS2 which contains the modified contents of nS1, then i want to create another NetworkStream nS3 which should be the combination of nS1 and nS2. Any idea how to go about that?
Asked
Active
Viewed 512 times
2 Answers
2
There's no such thing in the framework, but you can implement it yourself, as shown in the following question: How do I concatenate two System.Io.Stream instances into one?
-
Someone else provided an answer. Check this out :http://www.csharphelp.com/2007/03/combine-streams-in-a-single-c-stream-object/ – Kenzo Nov 07 '11 at 12:08
1
AFAIK there is nothing built in to the .Net framework for this. But I would personally have tried to write my own class for this.
However, it seems somebody may have done one for you, see if this is any good:
http://www.java2s.com/Open-Source/CSharp/Sound-Mp3/cspeex/java/io/SequenceInputStream.cs.htm

musefan
- 47,875
- 21
- 135
- 185