PrepAway - Latest Free Exam Questions & Answers

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 Windows application that provides a user interface similar to Microsoft Excel and allows users to manage their expenses.
You recently wrote a wrapper around the expense management application which performs security checks.
If the users have the sufficient rights the wrapper application launches the expense management application, if no sufficient rights the application should be forced to close.
You must decide which method of the Process class to use.
What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
Use the Kill method.

B.
Use the Close method.

C.
Use the Dispose method.

D.
Use the CloseMainWindows method.

Explanation:
To successfully have an application forcefully close or shutdown the Kill method should be used as it forces an immediate termination of the process.
Incorrect Answers:
B: This method should not be used as the Close method is used to free resources associated with the application process.
C: This method should not be used in the scenario as it is generally used to implement cleaning of unmanaged resources.
D: This method should not be used as this method requests that the application be closed and we require closing the application forcefully.

One Comment on “What should you do?


Leave a Reply