| Visual Basic (Declaration) | |
|---|---|
Public Function New( _ ByVal fileName As String, _ ByVal charset As String _ ) | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim fileName As String Dim charset As String Dim instance As New MimeAttachmentStream(fileName, charset) | |
Parameters
- fileName
- The name of the file to use to initialize the object.
- charset
- The character set to use for the part.
Use this constructor to create an new MimeAttachmentStream object initialized to the data provided in fileName using the provided charset. This constructor was provided as an easy-to-use alternative to MimeAttachmentStream(FileStream) as they both create an attachment from a file, but with MimeAttachmentStream(String) constructor, the FileStream is created internally.
When creating a MessagePartStream using this constructor, MessagePartStream.MimeEncoding will default to ContentEncoding.Base64.
Target Platforms: Microsoft .NET Framework 2.0