title: 'System.IO.MemoryStream' does not contain a definition 'for'?
body: <p>I am having a little problem here.</p>
  
  <blockquote>
    <p>Error1 'System.IO.MemoryStream' does not contain a definition for
    'CopyTo'</p>
  </blockquote>
  
  <p>My Code:</p>
  
  <pre><code>// Error occurs here (CopyTo) (For Framework 4.0)
  ms.CopyTo(actualAttachment);    
  actualAttachment.Position = 0;  
  
  //Change CopyTo to WriteTo For Framework 2.0
  ms.WriteTo(actualAttachment);   
  actualAttachment.Position = 0;  
  </code></pre>
  
  <p>I had to retype my whole code to make sure everything goes into a stream, because I had some problems with deleting a file after it's being send. but now I get this error.</p>
  
  <p>So basically it shouldn't save anything now.</p>
  
  <p>I simply didn't paid attention on what framework I was using.
  I work with 4 types of frameworks a day which sometimes really confuses me.</p>