Question 206
You are developing an application in C#.
You need to implement a custom exception for the application.
You have the following code.
How should you complete the code? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Question 207
You are developing an application that produces an executable named MyApp.exe and an assembly named MyApp.dll.
The application will be sold to several customers.
You need to ensure that enough debugging information is available for MyApp.exe, so that if the application throws an error in a customer's environment, you can debug the error in your own development environment.
What should you do?
Question 208
You are developing an application by using C#. The application will write events to an event log. You plan to deploy the application to a server.
You create an event source named AppSource and a custom log named AppLog on the server.
You need to write events to the custom log.
Which code segment should you use?
Question 209
You are creating a method named that accepts four parameters and returns a formatted string.
The getThanksYou method has the following signature.
The method needs to return a formatted string as shown in the following example.
Thank you Ben Smith for order 1234. The total price is $321.05.
The current culture when the method executes is en-US.
How should you complete the code? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Question 210
DRAG DROP
You are creating a class named Data that includes a dictionary object named _data.
You need to allow the garbage collection process to collect the references of the _data object.
You have the following code:
Which code segments should you include in Target 1 and Target 2 to complete the code?
(To answer, drag the appropriate code segments to the correct locations in the answer area. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)







