AttachmentBase 類別

定義

表示電子郵件附件的基底類別。Base class that represents an email attachment. AttachmentAlternateViewLinkedResource 類別都衍生自這個類別。Classes Attachment, AlternateView, and LinkedResource derive from this class.

public ref class AttachmentBase abstract : IDisposable
public abstract class AttachmentBase : IDisposable
type AttachmentBase = class
    interface IDisposable
Public MustInherit Class AttachmentBase
Implements IDisposable
繼承
AttachmentBase
衍生
實作

建構函式

AttachmentBase(Stream)

使用指定的 AttachmentBase 產生 StreamInstantiates an AttachmentBase with the specified Stream.

AttachmentBase(Stream, ContentType)

使用指定的 AttachmentBaseStream,產生 ContentTypeInstantiates an AttachmentBase with the specified Stream and ContentType.

AttachmentBase(Stream, String)

使用指定的 AttachmentBase 和媒體類型,產生 StreamInstantiates an AttachmentBase with the specified Stream and media type.

AttachmentBase(String)

使用指定的檔案名稱,產生 AttachmentBaseInstantiates an AttachmentBase with the specified file name.

AttachmentBase(String, ContentType)

使用指定的檔案名稱和內容類型,產生 AttachmentBaseInstantiates an AttachmentBase with the specified file name and content type.

AttachmentBase(String, String)

使用指定的檔案名稱和媒體類型,產生 AttachmentBaseInstantiates an AttachmentBase with the specified file name and media type.

屬性

ContentId

取得或設定這個附件的 MIME 內容識別碼。Gets or sets the MIME content ID for this attachment.

ContentStream

取得這個附件的內容資料流。Gets the content stream of this attachment.

ContentType

取得這個附件的內容類型。Gets the content type of this attachment.

TransferEncoding

取得或設定這個附件的編碼方式。Gets or sets the encoding of this attachment.

方法

Dispose()

釋放 AttachmentBase 使用的資源。Releases the resources used by the AttachmentBase.

Dispose(Boolean)

釋放 AttachmentBase 所使用的 Unmanaged 資源,並選擇性地釋放 Managed 資源。Releases the unmanaged resources used by the AttachmentBase and optionally releases the managed resources.

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

適用於