SyntaxFix
Write A Post
Hire A Developer
Questions
Try this:
private void btnAtt_Click(object sender, EventArgs e) { openFileDialog1.ShowDialog(); Attachment myFile = new Attachment(openFileDialog1.FileName); MyMsg.Attachments.Add(myFile); }