Which of the following exceptions will the try and catch block catch if a user calls MyMethod passing 501 as a parameter?

Posted by: Pdfprep Category: GSSP-.NET Tags: , ,

Allen works as a Software Developer for Mansoft Inc. He develops a Web application using Visual Studio .NET. He adds a Web reference to an XML Web service named MyWebService in the application. MyWebService includes a method named MyMethod, which takes user identification number as a parameter and returns a DataSet object containing user information. The System.ArgumentException is thrown if the user identification number does not lie between 1 and 500. Allen writes a try and catch block to capture the exception thrown by the Web service.

Which of the following exceptions will the try and catch block catch if a user calls MyMethod passing 501 as a parameter?
A . System.Web.Services.Protocols.SoapException
B . System.Web.Services.Protocols.SoapHeaderException
C . System.ApplicationException
D . System.ArgumentNullException

Answer: A

Leave a Reply

Your email address will not be published.