Mcad

Only available on StudyMode
  • Topic: .NET Framework, Microsoft Visual Studio, Visual Basic .NET
  • Pages : 114 (25006 words )
  • Download(s) : 90
  • Published : January 1, 2013
Open Document
Text Preview
Correctexams.com
Exam :070-316
Title:Developing Windows-based Applications with Visual C# .Net Version Number:6.0

Fast Way to get your Certification

Real Level Practice Questions Guides
www.correctexams.com

Important Note:
Please Read Carefully
This Study Guide has been carefully written and compiled by correctexams experts. It is designed to help you learn the concepts behind the questions rather than be a strict memorization tool. Repeated readings will increase your comprehension.

We continually add to and update our Study Guides with new questions, so check that you have the latest version of this Guide right before you take your exam.
For security purposes, each PDF file is encrypted with a unique serial number associated with your correct Exams account information. In accordance with International Copyright Law, correctexams reserves the right to take legal action against you should we find copies of this PDF file has been distributed to other parties. Please tell us what you think of this Study Guide. We appreciate both positive and critical comments as your feedback helps us improve future versions.

We thank you for buying our Study Guides and look forward to supplying you with all your Certification training needs.
Good studying!
correctexams Technical and Support Team

www.correctexams.com

Fast Way to get your Certification
Note: The book “MCAD/MCSD Self-Paced Training Kit: Developing Windows-Based Applications with Microsoft Visual Basic .NET and Microsoft Visual C# .NET” from Microsoft Press is denoted as “70306/70-316 Training kit” in references. Visual Studio .NET online references are also used.

QUESTION NO: 1
You use Visual Studio .NET to create a component named Request. This component includes a method named AcceptTKRequest, which tries to process new user requests for services. AcceptTKRequest 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 AcceptTKRequest:
this.Validate();
B. Use the following code segment in AcceptTKRequest:
try {
this.Validate();
}
catch(Exception ex) {
throw ex;
}
C. Use the following code segment in AcceptTKRequest:
try {
this.Validate();
}
catch(Exception ex) {
throw new Exception(“Exception in AcceptTKRequest”, 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 AcceptTKRequest: try {

www.correctexams.com
-3-

Fast Way to get your Certification
this.Validate();

}
catch(Exception ex) {
throw new RequestException(“Exception in AcceptTKRequest”, ex); }
Answer: B
Explanation: The throw keyword is used to rethrow exceptions. We should catch the exceptions with a try…catch construct. We then simply rethrow the exception with the throw keyword. Reference: 70-306/70-316 Training kit, Rethrowing Exceptions, Pages 239-240 Incorrect Answers

A: We must use a try…catch construction to be able to catch the exception. C: There is no requirement to wrap the exception into a new exception with the new Exception(“Exception in AcceptRequest”, ex) code. At the contrary, the scenario has the requirement only to bubble up the exceptions.

D: There is no need to create a custom exception.

QUESTION NO: 2
You work as software developer at TestKing inc. You need to develop a Windows form that provides online help for users. You want the help functionality to be available when users press the F1 key. Help text will...
tracking img