Sail E0 Webinar
Question
Select the properties related to the network errors generated by WebException:
Options:
A .  Response
B .  get
C .  set
D .  None of the mentioned
Answer: Option A


WebException has two properties that relate to network errors:
Response and Status.
We can obtain a reference to the WebResponse object inside an exception handler through the Response property. For the HTTP protocol, this object describes the error. It is defined like this: public WebResponse Response { get; }
When an error occurs, we can use the Status property of WebException to find out what went wrong. It is defined like this:
public WebExceptionStatus Status {get; }



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers