Which class should you use?

Posted by: Pdfprep Category: 70-483 Tags: , ,

You have a C# application.

The application requires 500 MB of available memory.

You need to identify whether there is enough available memory when the application starts.

Which class should you use?
A . OutOfmemoryException
B . MemoryStream
C . PerformanceCounter
D . DiagnosticsConfigurationHandler

Answer: C

Explanation:

The counter is the mechanism by which performance data is collected. The registry stores the names of all the counters, each of which is related to a specific area of system functionality. Examples include a processor’s busy time, memory usage, or the number of bytes received over a network connection.

Reference: PerformanceCounter Class

https://msdn.microsoft.com/en-us/library/system.diagnostics.performancecounter.aspx

Leave a Reply

Your email address will not be published.