WebException Constructor (String, Exception, WebExceptionStatus, WebResponse)

WebException Constructor (String, Exception, WebExceptionStatus, WebResponse)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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

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

'Declaration
Public Sub New ( _
	message As String, _
	inner As Exception, _
	status As WebExceptionStatus, _
	response As WebResponse _
)

Parameters

message
Type: System.String
The text of the error message.
inner
Type: System.Exception
status
Type: System.Net.WebExceptionStatus
One of the WebExceptionStatus values.
response
Type: System.Net.WebResponse
A WebResponse instance that contains the response from the remote host.

The WebException instance is initialized with the Message property set to the value of message, the InnerException property set to the value of innerException, the Status property set to the value of status, and the Response property set to the value of response. If message is Nothing, the Message property is initialized to a system-supplied message.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft