Share via


WebException Constructor (String, Exception, WebExceptionStatus, WebResponse)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Initializes a new instance of the WebException class with the specified error message, nested exception, status, and response.

Namespace:  System.Net
Assembly:  System.Http (in System.Http.dll)

Syntax

'Declaration
Public Sub New ( _
    message As String, _
    inner As Exception, _
    status As WebExceptionStatus, _
    response As WebResponse _
)
public WebException(
    string message,
    Exception inner,
    WebExceptionStatus status,
    WebResponse response
)
public:
WebException(
    String^ message, 
    Exception^ inner, 
    WebExceptionStatus status, 
    WebResponse^ response
)
new : 
        message:string * 
        inner:Exception * 
        status:WebExceptionStatus * 
        response:WebResponse -> WebException
public function WebException(
    message : String, 
    inner : Exception, 
    status : WebExceptionStatus, 
    response : WebResponse
)

Parameters

Remarks

The WebException instance is initialized with the Message property set to the value of message, the InnerException property set to the value of inner, the Status property set to the value of status, and the Response property set to the value of response. If message is null Nothing nullptr unit a null reference (Nothing in Visual Basic) , the Message property is initialized to a system-supplied message.

.NET Framework Security

See Also

Reference

WebException Class

WebException Overload

System.Net Namespace