PdfPrep.com

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 Counter1 is available for use in Windows Performance Monitor (PerfMon).

Which code segment should you insert at line 16?
A . CounterType = PerformanccCounterType.RawBase
B . CounterType = PerformanceCounterType.AverageBase
C . CounterType = PerformanceCounterType.SampleBase
D . CounterType = PerformanceCounterType.CounterMultiBase

Answer: C

Explanation:

Note SampleFraction on line 9. The Base counter type SampleBase has the Parent (composite) counter type SampleFraction.

Reference: PerformanceCounterType Enumeration

http://msdn.microsoft.com/en-us/library/system.diagnostics.performancecountertype.aspx

Exit mobile version