C# : Attachment from byte array?
- by JL
I have a byte[] which is a file, and I would like to send it as an attachment using System.Net.Mail.
I noticed the attachment class has 1 overload which accepts a stream.
Attachment att = new Attachment(Stream contentStream,string name);
Is it possible to pass the byte[] through this overload?