A
Abraham Andres Luna
does anyone know how to convert any type of object to a byte array
some code that doesn't work:
MailMessage mmSpec = new MailMessage("(e-mail address removed)", "(e-mail address removed)");
mmSpec.Attachments.Add(new Attachment(Server.MapPath("doc.pdf")));
mmSpec.Subject = "Test";
mmSpec.Body = "Hello";
mmSpec.IsBodyHtml = true;
MemoryStream msEmail = new MemoryStream((byte[])mmSpec);
i want to convert it to a byte array so i can save it to a file or sql
server, thank you.
some code that doesn't work:
MailMessage mmSpec = new MailMessage("(e-mail address removed)", "(e-mail address removed)");
mmSpec.Attachments.Add(new Attachment(Server.MapPath("doc.pdf")));
mmSpec.Subject = "Test";
mmSpec.Body = "Hello";
mmSpec.IsBodyHtml = true;
MemoryStream msEmail = new MemoryStream((byte[])mmSpec);
i want to convert it to a byte array so i can save it to a file or sql
server, thank you.