Valid 70-483 Dumps shared by ExamDiscuss.com for Helping Passing 70-483 Exam! ExamDiscuss.com now offer the newest 70-483 exam dumps, the ExamDiscuss.com 70-483 exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com 70-483 dumps with Test Engine here:
You are testing an application. The application includes methods named CalculateInterestand 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 CalculateInterest()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.)
Correct Answer: D,G
Explanation/Reference: Explanation: D: Also, it's worth pointing out that you can use [Conditional("DEBUG")] attribute on methods that return void to have them only executed if a certain symbol is defined. The compiler would remove all calls to those methods if the symbol is not defined: [ Conditional("DEBUG")] void PrintLog() { Console.WriteLine("Debug info"); } void Test() { PrintLog(); } G: When the C# compiler encounters an #if directive, followed eventually by an #endif directive, it will compile the code between the directives only if the specified symbol is defined. Unlike C and C++, you cannot assign a numeric value to a symbol; the #if statement in C# is Boolean and only tests whether the symbol has been defined or not. For example, # define DEBUG # if DEBUG Console.WriteLine("Debug version"); # endif Reference: http://stackoverflow.com/questions/2104099/c-sharp-if-then-directives-for-debug-vs-release