AttachmentCollection.AddFileAttachment Method

Definition

Overloads

AddFileAttachment(String)

Adds a file attachment to the collection.

AddFileAttachment(String, Byte[])

Adds a file attachment to the collection that contains the file.

AddFileAttachment(String, Stream)

Adds a file attachment to the collection by using a data stream that contains the file.

AddFileAttachment(String, String)

Adds a file attachment to the collection.

AddFileAttachment(String)

Adds a file attachment to the collection.

public:
 Microsoft::Exchange::WebServices::Data::FileAttachment ^ AddFileAttachment(System::String ^ fileName);
public Microsoft.Exchange.WebServices.Data.FileAttachment AddFileAttachment (string fileName);
Public Function AddFileAttachment (fileName As String) As FileAttachment

Parameters

fileName
String

The path to a file to be added to the collection.

Returns

A file attachment.

Applies to

AddFileAttachment(String, Byte[])

Adds a file attachment to the collection that contains the file.

public:
 Microsoft::Exchange::WebServices::Data::FileAttachment ^ AddFileAttachment(System::String ^ name, cli::array <System::Byte> ^ content);
public Microsoft.Exchange.WebServices.Data.FileAttachment AddFileAttachment (string name, byte[] content);
Public Function AddFileAttachment (name As String, content As Byte()) As FileAttachment

Parameters

name
String

The file attachment's display name.

content
Byte[]

A byte array that represents the content of the file attachment.

Returns

A file attachment.

Applies to

AddFileAttachment(String, Stream)

Adds a file attachment to the collection by using a data stream that contains the file.

public:
 Microsoft::Exchange::WebServices::Data::FileAttachment ^ AddFileAttachment(System::String ^ name, System::IO::Stream ^ contentStream);
public Microsoft.Exchange.WebServices.Data.FileAttachment AddFileAttachment (string name, System.IO.Stream contentStream);
Public Function AddFileAttachment (name As String, contentStream As Stream) As FileAttachment

Parameters

name
String

The file attachment's display name.

contentStream
Stream

The data stream that contains the file to be attached to the collection.

Returns

A file attachment.

Applies to

AddFileAttachment(String, String)

Adds a file attachment to the collection.

public:
 Microsoft::Exchange::WebServices::Data::FileAttachment ^ AddFileAttachment(System::String ^ name, System::String ^ fileName);
public Microsoft.Exchange.WebServices.Data.FileAttachment AddFileAttachment (string name, string fileName);
Public Function AddFileAttachment (name As String, fileName As String) As FileAttachment

Parameters

name
String

The file attachment's display name.

fileName
String

The file attachment's file name.

Returns

A file attachment.

Applies to