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)

來源:
Attachment.cs
來源:
Attachment.cs
來源:
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)

來源:
Attachment.cs
來源:
Attachment.cs
來源:
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)

來源:
Attachment.cs
來源:
Attachment.cs
來源:
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)

來源:
Attachment.cs
來源:
Attachment.cs
來源:
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)

來源:
Attachment.cs
來源:
Attachment.cs
來源:
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)

來源:
Attachment.cs
來源:
Attachment.cs
來源:
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 不是有效的值。

適用於