How to convert a byte array to Stream
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/4736155/how-do-i-convert-byte-to-stream-in-c">How do I convert byte[] to stream in C#?</a>  </p>
</blockquote>



<p>I need to convert a byte array to a Stream . How to do so in C#?</p>

<p>It is in asp.net application.</p>

<p>FileUpload Control Name: taxformUpload</p>

<p><strong>Program</strong></p>

<pre><code>byte[] buffer = new byte[(int)taxformUpload.FileContent.Length];
taxformUpload.FileContent.Read(buffer, 0, buffer.Length);

Stream stream = ConvertToStream(buffer);
</code></pre>

<p>Thanks in advance</p>
