Home / CSE MCQs / C#.Net MCQs :: Discussion

Discussion :: C#.Net MCQs

  1. Select the properties related to the network errors generated by WebException:
  2. A.
    Response
    B.
    get
    C.
    set
    D.
    None of the mentioned

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    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; }


Be The First To Comment