Question 256
You need to write a console application that meets the following requirements:
If the application is compiled in Debug mode, the console output must display Entering debug mode.
If the application is compiled in Release mode, the console output must display Entering release mode.
Which code should you use?
Question 257
You have the following code:
You need to retrieve all of the numbers from the items variable that are greater than 80.
Which code should you use?
Question 258
You are creating an application that manages information about your company's products. The application includes a class named Product and a method named Save.
The Save() method must be strongly typed. It must allow only types inherited from the Product class that use a constructor that accepts no parameters.
You need to implement the Save() method.
Which code segment should you use?
Question 259
HOTSPOT
You are implementing a library method that accepts a character parameter and returns a string.
If the lookup succeeds, the method must return the corresponding string value. If the lookup fails, the
method must return the value "invalid choice."
You need to implement the lookup algorithm.
How should you complete the relevant code? (To answer, select the correct keyword in each drop-down
list in the answer area.)
Hot Area:
Question 260
You are developing a C# application that has a requirement to validate some string input data by using the
Regex class.
The application includes a method named ContainsHyperlink. The ContainsHyperlink()method
will verify the presence of a URI and surrounding markup.
The following code segment defines the ContainsHyperlink()method. (Line numbers are included for
reference only.)
The expression patterns used for each validation function are constant.
You need to ensure that the expression syntax is evaluated only once when the Regex object is initially
instantiated.
Which code segment should you insert at line 04?

