語言

AttachmentBase 建構函式

定義

實例化一個新的 AttachmentBase。

多載

名稱 Description
AttachmentBase(Stream)

實例化 且 AttachmentBase 為指定 Stream。

AttachmentBase(String)

實例化 並 AttachmentBase 以指定的檔案名稱。

AttachmentBase(Stream, ContentType)

實例化 a AttachmentBase 並指定 Stream 和 ContentType。

AttachmentBase(Stream, String)

實例化 an AttachmentBase ,並以指定的 Stream 媒介類型。

AttachmentBase(String, ContentType)

實例化 an AttachmentBase ,並以指定的檔案名稱和內容類型。

AttachmentBase(String, String)

實例化 並 AttachmentBase 以指定的檔案名稱和媒體類型。

AttachmentBase(Stream)

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

一個包含此附件內容的串流。

例外狀況

contentStream 是 null。

適用於

AttachmentBase(String)

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

存放此附件內容的檔名。

例外狀況

fileName 是 null。

適用於

AttachmentBase(Stream, ContentType)

來源:
Attachment.cs
來源:
Attachment.cs
來源:
Attachment.cs
來源:
Attachment.cs
來源:
Attachment.cs

實例化 a AttachmentBase 並指定 Stream 和 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

內容的型別。

例外狀況

contentStream 是 null。

contentType 不是有效值。

適用於

AttachmentBase(Stream, String)

來源:
Attachment.cs
來源:
Attachment.cs
來源:
Attachment.cs
來源:
Attachment.cs
來源:
Attachment.cs

實例化 an 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 媒體類型。

例外狀況

contentStream 是 null。

mediaType 不是有效值。

適用於

AttachmentBase(String, ContentType)

來源:
Attachment.cs
來源:
Attachment.cs
來源:
Attachment.cs
來源:
Attachment.cs
來源:
Attachment.cs

實例化 an 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

內容的型別。

例外狀況

fileName 是 null。

contentType 不是有效值。

適用於

AttachmentBase(String, String)

來源:
Attachment.cs
來源:
Attachment.cs
來源:
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 媒體類型。

例外狀況

fileName 是 null。

mediaType 不是有效值。

適用於