|
Related Questions |
View Answer |
|
You use Visual Studio .NET to create a component named Request. This component includes a method named AcceptEXRequest, which tries to process new user requests for services. AcceptEXRequest calls a private function named Validate. You must ensure that any exceptions encountered by Validate are bubbled up to the parent form of Request. The parent form will then be responsible for handling the exceptions. You want to accomplish this goal by writing the minimum amount of code. What should you do? A. Use the following code segment in AcceptESRequest: this.Validate(); B. Use the following code segment in AcceptESRequest: try { this.Validate(); } catch(Exception ex) { throw ex;} C. Use the following code segment in AcceptESRequest: try { this.Validate();} catch(Exception ex) {throw new Exception(“Exception in AcceptESRequest”, ex); } D. Create a custom Exception class named RequestException by using the following code segment: public class RequestException:ApplicationException { public RequestException():base() {} public RequestException (string message):base(message) { } public RequestException(string message, Exception inner):base(message, inner) { } } In addition, use the following code segment in AcceptESRequest: try {.this.Validate(); } catch(Exception ex) { throw new RequestException(“Exception in AcceptESRequest”, ex); }
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All MCSD.NET - 70-316 Exam Interview Questions & Answers - Exam Mode /
Learning Mode
|