| Visual Basic (Declaration) | |
|---|---|
Public Function New( _ ByVal content As Stream, _ ByVal fileName As String, _ ByVal type As ContentType, _ ByVal encoding As ContentEncoding, _ ByVal charset As String _ ) | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim content As Stream Dim fileName As String Dim type As ContentType Dim encoding As ContentEncoding Dim charset As String Dim instance As New MimeAttachmentStream(content, fileName, type, encoding, charset) | |
| C# | |
|---|---|
public MimeAttachmentStream( Stream content, string fileName, ContentType type, ContentEncoding encoding, string charset ) | |
| Managed Extensions for C++ | |
|---|---|
public: MimeAttachmentStream( Stream* content, string* fileName, ContentType type, ContentEncoding encoding, string* charset ) | |
| C++/CLI | |
|---|---|
public: MimeAttachmentStream( Stream^ content, String^ fileName, ContentType type, ContentEncoding encoding, String^ charset ) | |
Parameters
- content
- A Stream containing data to be added as an attachment.
- fileName
- The name of the file to use to initialize the object.
- type
- A ContentType specifying the content type to use.
- encoding
- A ContentEncoding type specifying the MIME encoding to use.
- charset
- The character set to use for the part.
Use this constructor to create an new MimeAttachmentStream object initialized with a Stream. This constructor is useful if you have data in memory (perhaps in a MemoryStream object) that you wish to add as an attachment. You can simply create an attachment from the MemoryStream directly as opposed to having to create a temp file.
Target Platforms: Microsoft .NET Framework 2.0