Which code segment should you insert at line 04?
You are implementing a method named FloorTemperature 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?
Which garbage collector method should you use?
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?
Which algorithm should you use?
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?
Which code segment should you insert at line 16?
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 Counter2 is available for use in Windows Performance Monitor (PerfMon).
Which code segment should you insert at line 16?
What are two possible ways to achieve this goal?
You are testing an application. The application includes methods named CalculateInterest and LogLine. The
CalculateInterest() method calculates loan interest. The LogLine() method sends diagnostic messages to a
console window.
The following code implements the methods. (Line numbers are included for reference only.)
You have the following requirements:
The Calculatelnterest() method must run for all build configurations.
The LogLine() method must run only for debug builds.
You need to ensure that the methods run correctly.
What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose
two.)
Which code segment should you use?
You need to meet the requirements
You are debugging an application that calculates loan interest. The application includes the following code.
(Line numbers are included for reference only.)
You have the following requirements:
The debugger must break execution within the Calculatelnterest() method when the loanAmount variable is
less than or equal to zero.
The release version of the code must not be impacted by any changes.
You need to meet the requirements.
What should you do?
Which code segment should you add at line 19?
Which collection type should you use?
You are developing an application that includes a class named Order. The application will store a collection of
Order objects.
The collection must meet the following requirements:
Internally store a key and a value for each collection item.
Provide objects to iterators in ascending order based on the key.Ensure that item are accessible by zero-based index or by key.
You need to use a collection type that meets the requirements.
Which collection type should you use?
Which code segment should you insert at line 20?
You are developing an application. The application converts a Location object to a string by using a methodnamed WriteObject.
The WriteObject() method accepts two parameters, a Location object and an XmlObjectSerializer object.
The application includes the following code. (Line numbers are included for reference only.)
You need to serialize the Location object as XML.
Which code segment should you insert at line 20?