AttachmentCollection.AddFileAttachment 方法

定义

重载

AddFileAttachment(String)

将文件附件添加到集合。

AddFileAttachment(String, Byte[])

将文件附件添加到包含该文件的集合。

AddFileAttachment(String, Stream)

使用包含文件的数据流将文件附件添加到集合。

AddFileAttachment(String, String)

将文件附件添加到集合。

AddFileAttachment(String)

将文件附件添加到集合。

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

参数

fileName
String

要添加到集合的文件的路径。

返回

文件附件。

适用于

AddFileAttachment(String, Byte[])

将文件附件添加到包含该文件的集合。

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

参数

name
String

文件附件的显示名称。

content
Byte[]

表示文件附件内容的字节数组。

返回

文件附件。

适用于

AddFileAttachment(String, Stream)

使用包含文件的数据流将文件附件添加到集合。

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

参数

name
String

文件附件的显示名称。

contentStream
Stream

包含要附加到集合的文件的数据流。

返回

文件附件。

适用于

AddFileAttachment(String, String)

将文件附件添加到集合。

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

参数

name
String

文件附件的显示名称。

fileName
String

文件附件的文件名。

返回

文件附件。

适用于