Question 241
You are developing a C# application. The application references and calls a RESTful web service named EmployeeService. The EmployeeService web service includes a method named GetEmployee which accepts an employee ID as a parameter. The web service returns the following JSON data from the method.
The following code segment invokes the service and stores the result:
You need to convert the returned JSON data to an Employee object for use in the application.
Which code segment should you use?
A)
B)
C)
D)
Question 242
You are debugging an application that calculates loan interest. The application includes the following code. (Line numbers are included for reference only.)
01 private static decimal CalculateInterest(decimal loanAmount, int loanTerm,
decimal loanRate)
02 {
03
04 decimal interestAmount = loanAmount * loanRate * loanTerm;
05
06 return interestAmount;
07 }
You need to ensure that the debugger breaks execution within the Calculatelnterest() method when the loanAmount variable is less than or equal to zero in all builds of the application. What should you do?
Question 243
You are developing an application that includes the following code segment. (Line numbers are included for reference only.)
The GetAnimals() method must meet the following requirements:
* Connect to a Microsoft SQL Server database.
* Create Animal objects and populate them with data from the database.
* Return a sequence of populated Animal objects.
You need to meet the requirements.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
Question 244
You are developing an application that includes methods named ConvertAmountand TransferFunds.
You need to ensure that the precision and range of the value in the amount variable is not lost when the TransferFunds()method is called.
Which code segment should you use?
Question 245
DRAG DROP
You are developing a custom collection named LoanCollection for a class named Loan class.
You need to ensure that you can process each Loan object in the LoanCollection collection by using a foreach loop.
How should you complete the relevant 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.) Select and Place:

