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

Discussion :: C#.Net MCQs

  1. What does the following method specify?

    public static WebRequest Create(string requestUriString)
  2. A.
    Creates a WebRequest object for the URI specified by the string passed by requestUriString
    B.
    The object returned will implement the protocol specified by the prefix of the URI
    C.
    The object will be an instance of the class that inherits WebRequest
    D.
    All of the mentioned

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    Creates a WebRequest object for the URI specified by the string passed by requestUriString. The object returned will implement the protocol specified by the prefix of the URI.Thus, the object will be an instance of a class that inherits WebRequest. A NotSupportedException is thrown if the requested protocol is not available. A UriFormatException is thrown if the URI format is invalid.


Be The First To Comment