title: Casting stream to filestream
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3769067/convert-a-stream-to-a-filestream-in-c-sharp">Convert a Stream to a FileStream in C#</a>  </p>
  </blockquote>
  
  
  
  <p>My question is regarding the cast of stream to FileStream ...</p>
  
  <p>Basically I need to do that to get the name of the file, because if I have just an object Stream it doesn't have the Name property, when FileStream does ...</p>
  
  <p>So how to do it properly, how to cast Stream object to FileStream ...?</p>
  
  <p>Another problem is that this stream comes from webResponse.GetResponseStream() and if I cast it to FileStream I get it empty. Basically I could also use stream but i need to get the file name.</p>
  
  <p>I'm using 3.5</p>
  
  <p>Any ideas?</p>