What should you do?

You work as the application developer at Domain.com. Domain.com uses Visual Studio.NET 2005 as its application development platform.
You are developing a .NET Framework 2.0 application that will be used for publishing its own custom performance counter.
You additionally require the value of a performance counter to increase by 5 and must minimize the amount of code needed to write.
What should you do?

You work as the application developer at Domain.com. Domain.com uses Visual Studio.NET 2005 as its application development platform.
You are developing a .NET Framework 2.0 application that will be used for publishing its own custom performance counter.
You additionally require the value of a performance counter to increase by 5 and must minimize the amount of code needed to write.
What should you do?

A.
Use the NextValue method.

B.
Use the Decrement method.

C.
Use the Increment method.

D.
Use the IncrementBy method.

Explanation:
To have the value of a counter decreased by the desired amount the best choice of method requiring the least amount of code would be the IncrementBy method.
Incorrect Answers:
A: This is the code used to return the value of the counter and should not be used in the scenario.
B: The method is used if you want to have the value decreased and in the scenario an increase is needed.
C: This method is used to only increase the value of the counter by one and should not be used.



Leave a Reply 1

Your email address will not be published. Required fields are marked *


mr_tienvu

mr_tienvu

I have the same idea. D