title: How to write a Stream to file?
body: <p>I have an embedded DLL in my app and I need to write it to the filesystem at runtime. I have this so far:</p>
  
  <pre><code>Dim _assembly As Assembly = Assembly.GetExecutingAssembly()
  Dim _rawstream As Stream = _assembly.GetManifestResourceStream("MyFile.dll")
  </code></pre>
  
  <p>I just need to write _rawstream to a file now.</p>
  
  <p>EDIT: This has to be .NET Framework 2 and CopyTo does not exist :(</p>