1.
You are implementing a method named Calculate that performs conversions between value types and reference types. The following code segment implements the method. (Line numbers are included for reference only.) You need to ensure that the application does not throw exceptions on invalid conversions. Which code segment should you insert at line 04?
2.
You are creating a console application by using C#. You need to access the application assembly. Which code segment should you use?
 
3.
You use the Task.Run() method to launch a long-running data processing operation. The data processing operation often fails in times of heavy network congestion. If the data processing operation fails, a second operation must clean up any results of the first operation. You need to ensure that the second operation is invoked only if the data processing operation throws an unhandled exception. What should you do?
4.
You are developing a method named CreateCounters that will create performance counters for an application. The method includes the following code. (Line numbers are included for reference only.) You need to ensure that Counter1 is available for use in Windows Performance Monitor (PerfMon). Which code segment should you insert at line 16?
5.
You are developing an application that will transmit large amounts of data between a client computer and a server. You need to ensure the validity of the data by using a cryptographic hashing algorithm. Which algorithm should you use?
6.
You are debugging an application that calculates loan interest. The application includes the following code. (Line numbers are included for reference only.) You need to ensure that the debugger breaks execution within the CalculateInterest() method when the loanAmount variable is less than or equal to zero in all builds of the application. What should you do?
7.
You are creating a console application by using C#. You need to access the assembly found in the file named car.dll. Which code segment should you use?
8.
You are developing an application by using C#. The application includes an object that performs a long running process. You need to ensure that the garbage collector does not release the object's resources until the process completes. Which garbage collector method should you use?
9.
An application includes a class named Person. The Person class includes a method named GetData. You need to ensure that the GetData() method can be used only by the Person class and not by any class derived from the Person class. Which access modifier should you use for the GetData() method?
10.
An application receives JSON data in the following format: The application includes the following code segment. (Line numbers are included for reference only.) You need to ensure that the ConvertToName() method returns the JSON input string as a Name object. Which code segment should you insert at line 10?