AttachmentBase 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
实例化新的 AttachmentBase。
重载
| 名称 | 说明 |
|---|---|
| AttachmentBase(Stream) |
实例化 AttachmentBase 具有指定的 Stream。 |
| AttachmentBase(String) |
实例化具有指定文件名的一个 AttachmentBase 。 |
| AttachmentBase(Stream, ContentType) |
实例化 AttachmentBase 具有指定 Stream 和 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
- 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
包含此附件内容的流。
例外
contentStream 是 null。
适用于
AttachmentBase(String)
- Source:
- Attachment.cs
- Source:
- Attachment.cs
- 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
保存此附件内容的文件名。
例外
fileName 是 null。
适用于
AttachmentBase(Stream, ContentType)
- Source:
- Attachment.cs
- Source:
- Attachment.cs
- Source:
- Attachment.cs
- Source:
- Attachment.cs
- Source:
- Attachment.cs
实例化 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)
- Source:
- Attachment.cs
- Source:
- Attachment.cs
- 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 媒体类型。
例外
contentStream 是 null。
mediaType 不是有效值。
适用于
AttachmentBase(String, ContentType)
- Source:
- Attachment.cs
- Source:
- Attachment.cs
- 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
内容的类型。
例外
fileName 是 null。
contentType 不是有效值。
适用于
AttachmentBase(String, String)
- Source:
- Attachment.cs
- Source:
- Attachment.cs
- 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 媒体类型。
例外
fileName 是 null。
mediaType 不是有效值。