title: Illegal characters in the path
body: <p>I'm trying to send mail with attachments using smtp client.
  Everything goes well when I'm trying to add an attachment like that:</p>
  
  <pre><code>System.Net.Mail.Attachment attachment;
  attachment = new System.Net.Mail.Attachment(@"C:\icon.jpg");
  mail.Attachments.Add(attachment);
  </code></pre>
  
  <p>but when I try to read a path from the console like:</p>
  
  <pre><code>string path = Console.Read();
  System.Net.Mail.Attachment attachment;
  attachment = new System.Net.Mail.Attachment(path);
  mail.Attachments.Add(attachment);
  </code></pre>
  
  <p>I'm getting the exception</p>
  
  <blockquote>
    <p>Illegal charcters in the path</p>
  </blockquote>
  
  <p>Is there anyone who could explain to me why it doesn't work? </p>