AttachmentBase 构造函数

定义

实例化一个新的 AttachmentBase

重载

AttachmentBase(Stream)

用指定的 AttachmentBase 实例化一个 Stream

AttachmentBase(String)

用指定的文件名实例化一个 AttachmentBase

AttachmentBase(Stream, ContentType)

用指定的 AttachmentBaseStream 实例化一个 ContentType

AttachmentBase(Stream, String)

用指定的 AttachmentBase 和媒体类型实例化一个 Stream

AttachmentBase(String, ContentType)

用指定的文件名和内容类型实例化一个 AttachmentBase

AttachmentBase(String, String)

用指定的文件名和媒体类型实例化一个 AttachmentBase

AttachmentBase(Stream)

Source:
Attachment.cs
Source:
Attachment.cs
Source:
Attachment.cs

用指定的 AttachmentBase 实例化一个 Stream

protected:
 AttachmentBase(System::IO::Stream ^ contentStream);
protected AttachmentBase (System.IO.Stream contentStream);
new System.Net.Mail.AttachmentBase : System.IO.Stream -> System.Net.Mail.AttachmentBase
Protected Sub New (contentStream As Stream)

参数

contentStream
Stream

一个包含此附件内容的流。

例外

contentStreamnull

适用于

AttachmentBase(String)

Source:
Attachment.cs
Source:
Attachment.cs
Source:
Attachment.cs

用指定的文件名实例化一个 AttachmentBase

protected:
 AttachmentBase(System::String ^ fileName);
protected AttachmentBase (string fileName);
new System.Net.Mail.AttachmentBase : string -> System.Net.Mail.AttachmentBase
Protected Sub New (fileName As String)

参数

fileName
String

保存此附件内容的文件的名称。

例外

fileNamenull

适用于

AttachmentBase(Stream, ContentType)

Source:
Attachment.cs
Source:
Attachment.cs
Source:
Attachment.cs

用指定的 AttachmentBaseStream 实例化一个 ContentType

protected:
 AttachmentBase(System::IO::Stream ^ contentStream, System::Net::Mime::ContentType ^ contentType);
protected AttachmentBase (System.IO.Stream contentStream, System.Net.Mime.ContentType? contentType);
protected AttachmentBase (System.IO.Stream contentStream, System.Net.Mime.ContentType contentType);
new System.Net.Mail.AttachmentBase : System.IO.Stream * System.Net.Mime.ContentType -> System.Net.Mail.AttachmentBase
Protected Sub New (contentStream As Stream, contentType As ContentType)

参数

contentStream
Stream

一个包含此附件内容的流。

contentType
ContentType

内容的类型。

例外

contentStreamnull

contentType 不是有效值。

适用于

AttachmentBase(Stream, String)

Source:
Attachment.cs
Source:
Attachment.cs
Source:
Attachment.cs

用指定的 AttachmentBase 和媒体类型实例化一个 Stream

protected:
 AttachmentBase(System::IO::Stream ^ contentStream, System::String ^ mediaType);
protected AttachmentBase (System.IO.Stream contentStream, string? mediaType);
protected AttachmentBase (System.IO.Stream contentStream, string mediaType);
new System.Net.Mail.AttachmentBase : System.IO.Stream * string -> System.Net.Mail.AttachmentBase
Protected Sub New (contentStream As Stream, mediaType As String)

参数

contentStream
Stream

一个包含此附件内容的流。

mediaType
String

内容的 MIME 媒体类型。

例外

contentStreamnull

mediaType 不是有效值。

适用于

AttachmentBase(String, ContentType)

Source:
Attachment.cs
Source:
Attachment.cs
Source:
Attachment.cs

用指定的文件名和内容类型实例化一个 AttachmentBase

protected:
 AttachmentBase(System::String ^ fileName, System::Net::Mime::ContentType ^ contentType);
protected AttachmentBase (string fileName, System.Net.Mime.ContentType? contentType);
protected AttachmentBase (string fileName, System.Net.Mime.ContentType contentType);
new System.Net.Mail.AttachmentBase : string * System.Net.Mime.ContentType -> System.Net.Mail.AttachmentBase
Protected Sub New (fileName As String, contentType As ContentType)

参数

fileName
String

保存此附件内容的文件的名称。

contentType
ContentType

内容的类型。

例外

fileNamenull

contentType 不是有效值。

适用于

AttachmentBase(String, String)

Source:
Attachment.cs
Source:
Attachment.cs
Source:
Attachment.cs

用指定的文件名和媒体类型实例化一个 AttachmentBase

protected:
 AttachmentBase(System::String ^ fileName, System::String ^ mediaType);
protected AttachmentBase (string fileName, string? mediaType);
protected AttachmentBase (string fileName, string mediaType);
new System.Net.Mail.AttachmentBase : string * string -> System.Net.Mail.AttachmentBase
Protected Sub New (fileName As String, mediaType As String)

参数

fileName
String

保存此附件内容的文件的名称。

mediaType
String

内容的 MIME 媒体类型。

例外

fileNamenull

mediaType 不是有效值。

适用于