What should you recommend?

You are reviewing an existing Windows application that uses .NET Framework 4. When the user clicks a button, the application sequentially processes thousands of image files contained in a directory. The user interface becomes unresponsive while the application processes the files. You have the following requirements:
. Modify the button’s click event.
. Increase application throughput by processing multiple image files concurrently.
. Ensure that the user interface remains responsive while the application processes the image files.
You need to recommend an approach for meeting the requirements. What should you recommend?
A. Iterate over the image files. For each image file, use the Process.Start() method to launch a console application that processes the image file.
B. Use the ThreadPool.QueueUserWorkItem() method to queue up a single work item that uses the Parallel.ForEach () method to process the image files concurrently.
C. Use the Parallel.ForEach() method to process the images concurrently.
D. Iterate over the image files by using the Parallel.ForEach() method. For each image file, start a separate thread that processes the image file, by using the Thread.Start() method.

microsoft-exams

Leave a Reply

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


The reCAPTCHA verification period has expired. Please reload the page.