views:

83

answers:

1

Ok it turns out this 3rd party component I am working with stores an email attachment in a property of string type (it is already decoded).

How would I store this to file now?

It has: filename, encodingtype and the string representation of the file.

+4  A: 

Open a file using a StreamWriter/TextWriter class and call the .Write method. Alternatively you can base64 encode it with Convert.ToBase64String first.

esac