HttpRequestException 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 HttpRequestException 類別的新執行個體。
多載
HttpRequestException() |
初始化 HttpRequestException 類別的新執行個體。 |
HttpRequestException(String) |
使用描述目前例外狀況的特定訊息,初始化 HttpRequestException 類別的新執行個體。 |
HttpRequestException(String, Exception) |
使用描述目前例外狀況和內部例外狀況的特定訊息,初始化 HttpRequestException 類別的新執行個體。 |
HttpRequestException(String, Exception, Nullable<HttpStatusCode>) |
使用描述目前例外狀況、內部例外狀況和 HTTP 狀態碼的特定訊息,初始化 類別的新實例 HttpRequestException 。 |
HttpRequestException(HttpRequestError, String, Exception, Nullable<HttpStatusCode>) |
使用特定訊息初始化 類別的新實例 HttpRequestException 內部例外狀況,以及 HTTP 狀態碼和 HttpRequestError 。 |
HttpRequestException()
初始化 HttpRequestException 類別的新執行個體。
public:
HttpRequestException();
public HttpRequestException ();
Public Sub New ()
適用於
HttpRequestException(String)
使用描述目前例外狀況的特定訊息,初始化 HttpRequestException 類別的新執行個體。
public:
HttpRequestException(System::String ^ message);
public HttpRequestException (string message);
public HttpRequestException (string? message);
new System.Net.Http.HttpRequestException : string -> System.Net.Http.HttpRequestException
Public Sub New (message As String)
參數
- message
- String
描述目前例外狀況的訊息。
適用於
HttpRequestException(String, Exception)
使用描述目前例外狀況和內部例外狀況的特定訊息,初始化 HttpRequestException 類別的新執行個體。
public:
HttpRequestException(System::String ^ message, Exception ^ inner);
public HttpRequestException (string message, Exception inner);
public HttpRequestException (string? message, Exception? inner);
new System.Net.Http.HttpRequestException : string * Exception -> System.Net.Http.HttpRequestException
Public Sub New (message As String, inner As Exception)
參數
- message
- String
描述目前例外狀況的訊息。
- inner
- Exception
內部例外狀況。
適用於
HttpRequestException(String, Exception, Nullable<HttpStatusCode>)
使用描述目前例外狀況、內部例外狀況和 HTTP 狀態碼的特定訊息,初始化 類別的新實例 HttpRequestException 。
public:
HttpRequestException(System::String ^ message, Exception ^ inner, Nullable<System::Net::HttpStatusCode> statusCode);
public HttpRequestException (string? message, Exception? inner, System.Net.HttpStatusCode? statusCode);
new System.Net.Http.HttpRequestException : string * Exception * Nullable<System.Net.HttpStatusCode> -> System.Net.Http.HttpRequestException
Public Sub New (message As String, inner As Exception, statusCode As Nullable(Of HttpStatusCode))
參數
- message
- String
描述目前例外狀況的訊息。
- inner
- Exception
內部例外狀況。
- statusCode
- Nullable<HttpStatusCode>
HTTP 狀態碼。
適用於
HttpRequestException(HttpRequestError, String, Exception, Nullable<HttpStatusCode>)
使用特定訊息初始化 類別的新實例 HttpRequestException 內部例外狀況,以及 HTTP 狀態碼和 HttpRequestError 。
public HttpRequestException (System.Net.Http.HttpRequestError httpRequestError, string? message = default, Exception? inner = default, System.Net.HttpStatusCode? statusCode = default);
new System.Net.Http.HttpRequestException : System.Net.Http.HttpRequestError * string * Exception * Nullable<System.Net.HttpStatusCode> -> System.Net.Http.HttpRequestException
Public Sub New (httpRequestError As HttpRequestError, Optional message As String = Nothing, Optional inner As Exception = Nothing, Optional statusCode As Nullable(Of HttpStatusCode) = Nothing)
參數
- httpRequestError
- HttpRequestError
導致此例外狀況的 HttpRequestError。
- message
- String
描述目前例外狀況的訊息。
- inner
- Exception
內部例外狀況。
- statusCode
- Nullable<HttpStatusCode>
HTTP 狀態碼。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應