SmtpFailedRecipientException 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 SmtpFailedRecipientException 類別的新執行個體。
多載
SmtpFailedRecipientException() |
初始化 SmtpFailedRecipientException 類別的空執行個體。 |
SmtpFailedRecipientException(String) |
使用指定的錯誤訊息,初始化 SmtpFailedRecipientException 類別的新執行個體。 |
SmtpFailedRecipientException(SmtpStatusCode, String) |
使用指定的狀態碼和電子郵件地址,初始化 SmtpFailedRecipientException 類別的新執行個體。 |
SmtpFailedRecipientException(SerializationInfo, StreamingContext) |
已淘汰.
初始化 SmtpFailedRecipientException 類別的新執行個體,這個執行個體是來自 SerializationInfo 和 StreamingContext 類別的指定執行個體。 |
SmtpFailedRecipientException(String, Exception) |
使用指定的錯誤訊息和內部例外狀況,初始化 SmtpException 類別的新執行個體。 |
SmtpFailedRecipientException(SmtpStatusCode, String, String) |
使用指定的狀態碼、電子郵件地址和伺服器回應,初始化 SmtpFailedRecipientException 類別的新執行個體。 |
SmtpFailedRecipientException(String, String, Exception) |
使用指定的錯誤訊息、電子郵件地址和內部例外狀況,初始化 SmtpException 類別的新執行個體。 |
SmtpFailedRecipientException()
初始化 SmtpFailedRecipientException 類別的空執行個體。
public:
SmtpFailedRecipientException();
public SmtpFailedRecipientException ();
Public Sub New ()
適用於
SmtpFailedRecipientException(String)
使用指定的錯誤訊息,初始化 SmtpFailedRecipientException 類別的新執行個體。
public:
SmtpFailedRecipientException(System::String ^ message);
public SmtpFailedRecipientException (string? message);
public SmtpFailedRecipientException (string message);
new System.Net.Mail.SmtpFailedRecipientException : string -> System.Net.Mail.SmtpFailedRecipientException
Public Sub New (message As String)
參數
備註
這個建構函式會 message
使用 參數來初始化 Message 屬性。
適用於
SmtpFailedRecipientException(SmtpStatusCode, String)
使用指定的狀態碼和電子郵件地址,初始化 SmtpFailedRecipientException 類別的新執行個體。
public:
SmtpFailedRecipientException(System::Net::Mail::SmtpStatusCode statusCode, System::String ^ failedRecipient);
public SmtpFailedRecipientException (System.Net.Mail.SmtpStatusCode statusCode, string? failedRecipient);
public SmtpFailedRecipientException (System.Net.Mail.SmtpStatusCode statusCode, string failedRecipient);
new System.Net.Mail.SmtpFailedRecipientException : System.Net.Mail.SmtpStatusCode * string -> System.Net.Mail.SmtpFailedRecipientException
Public Sub New (statusCode As SmtpStatusCode, failedRecipient As String)
參數
- statusCode
- SmtpStatusCode
備註
這個建構函式會 statusCode
使用 參數來初始化 StatusCode 屬性,並使用 failedRecipient
參數來初始化 FailedRecipient 屬性。
適用於
SmtpFailedRecipientException(SerializationInfo, StreamingContext)
警告
This API supports obsolete formatter-based serialization. It should not be called or extended by application code.
初始化 SmtpFailedRecipientException 類別的新執行個體,這個執行個體是來自 SerializationInfo 和 StreamingContext 類別的指定執行個體。
protected:
SmtpFailedRecipientException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected SmtpFailedRecipientException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected SmtpFailedRecipientException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Net.Mail.SmtpFailedRecipientException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.Mail.SmtpFailedRecipientException
[<System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Net.Mail.SmtpFailedRecipientException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.Mail.SmtpFailedRecipientException
Protected Sub New (info As SerializationInfo, context As StreamingContext)
參數
- info
- SerializationInfo
SerializationInfo,包含序列化新 SmtpFailedRecipientException 所需的資訊。
- context
- StreamingContext
StreamingContext,包含與新執行個體關聯之序列化資料流的來源和目的端。
- 屬性
備註
這個建構函式會 ISerializable 實作 類別的 SmtpFailedRecipientException 介面。
適用於
SmtpFailedRecipientException(String, Exception)
使用指定的錯誤訊息和內部例外狀況,初始化 SmtpException 類別的新執行個體。
public:
SmtpFailedRecipientException(System::String ^ message, Exception ^ innerException);
public SmtpFailedRecipientException (string? message, Exception? innerException);
public SmtpFailedRecipientException (string message, Exception innerException);
new System.Net.Mail.SmtpFailedRecipientException : string * Exception -> System.Net.Mail.SmtpFailedRecipientException
Public Sub New (message As String, innerException As Exception)
參數
- innerException
- Exception
做為目前例外狀況發生原因的例外狀況。
適用於
SmtpFailedRecipientException(SmtpStatusCode, String, String)
使用指定的狀態碼、電子郵件地址和伺服器回應,初始化 SmtpFailedRecipientException 類別的新執行個體。
public:
SmtpFailedRecipientException(System::Net::Mail::SmtpStatusCode statusCode, System::String ^ failedRecipient, System::String ^ serverResponse);
public SmtpFailedRecipientException (System.Net.Mail.SmtpStatusCode statusCode, string? failedRecipient, string? serverResponse);
public SmtpFailedRecipientException (System.Net.Mail.SmtpStatusCode statusCode, string failedRecipient, string serverResponse);
new System.Net.Mail.SmtpFailedRecipientException : System.Net.Mail.SmtpStatusCode * string * string -> System.Net.Mail.SmtpFailedRecipientException
Public Sub New (statusCode As SmtpStatusCode, failedRecipient As String, serverResponse As String)
參數
- statusCode
- SmtpStatusCode
備註
這個建構函式會 statusCode
使用 參數來初始化 StatusCode 屬性,並使用 failedRecipient
參數來初始化 FailedRecipient 屬性。
適用於
SmtpFailedRecipientException(String, String, Exception)
使用指定的錯誤訊息、電子郵件地址和內部例外狀況,初始化 SmtpException 類別的新執行個體。
public:
SmtpFailedRecipientException(System::String ^ message, System::String ^ failedRecipient, Exception ^ innerException);
public SmtpFailedRecipientException (string? message, string? failedRecipient, Exception? innerException);
public SmtpFailedRecipientException (string message, string failedRecipient, Exception innerException);
new System.Net.Mail.SmtpFailedRecipientException : string * string * Exception -> System.Net.Mail.SmtpFailedRecipientException
Public Sub New (message As String, failedRecipient As String, innerException As Exception)
參數
- innerException
- Exception
做為目前例外狀況發生原因的例外狀況。