PrepAway - Latest Free Exam Questions & Answers

How should you complete the relevant code?

DRAG DROP
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.
You have the following requirements:
The CalculateInterest() method must run for all build configurations.
The LogLine() method must be called only for debug builds.
You need to ensure that the methods run correctly.
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.)

PrepAway - Latest Free Exam Questions & Answers

Answer:

One Comment on “How should you complete the relevant code?

  1. PaulC says:

    #if DEBUG
    LogLine….
    #endif

    There is also [Conditional(“DEBUG”)] option, but it cant be used on methods with other then void return values. Moreover, there are two places to fill.




    4



    0

Leave a Reply