You are creating a Windows Forms application. You create a class named ApplicationUtilities
and add a method named BackgroundProcess. You anticipate that the BackgroundProcess
method may require several minutes or longer to execute. You need to ensure that the application remains responsive while the BackgroundProcess method runs. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A.
Create an instance of a System.Threading.ThreadStart delegate named AsyncDelegate, and pass the BackgroundProcess method in as a parameter.
B.
Create a delegate named AsyncDelegate that matches the signature of the BackgroundProcess method.
C.
Implement the IAsyncResult interface for the ApplicationUtilities class.
D.
Override the BeginInvoke and EndInvoke methods for the ApplicationUtilities class.
E.
Call AsyncDelegate.BeginInvoke to execute to method. After the method is complete, call AsyncDelegate.EndInvoke.
F.
Call ApplicationUtilities.BeginInvoke to execute the method.
After the method is complete, call ApplicationUtilities.EndInvoke.