| Visual Basic (Declaration) | |
|---|---|
Public Overloads Function Add( _ ByVal attachment As MimeAttachmentStream _ ) As Integer | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As Attachments Dim attachment As MimeAttachmentStream Dim value As Integer value = instance.Add(attachment) | |
| C# | |
|---|---|
public int Add( MimeAttachmentStream attachment ) | |
| Managed Extensions for C++ | |
|---|---|
public: int Add( MimeAttachmentStream* attachment ) | |
| C++/CLI | |
|---|---|
public: int Add( MimeAttachmentStream^ attachment ) | |
Parameters
- attachment
- The MimeAttachmentStream to add to the collection.
| Exception | Description |
|---|---|
| Dart.PowerTCP.Mail.InvalidParameterTypeException | attachment is not a MimeAttachmentStream. |
Use this method to add a MimeAttachmentStream (which represents a MIME attachment) to the MessageStream.Attachments collection. Since the Attachments collection actually reflects the MessageStream.Parts.Attachments collection, a new MimeAttachmentStream will be added to the MessageStream.Parts.Attachments collection and the Message.Attachments collection will reflect this. If any other type of Stream is added to the MessageStream.Attachments collection, an exception will be thrown.
Target Platforms: Microsoft .NET Framework 2.0