You need to implement an asynchronous method to the Download method.
You have the following class:
public class Job
{
public void Download[]
{
}
}
Which of the following segments should you use? (Use the event-base asynchronous pattern)
A.
public |AsyncResult InvokeDownload[]
{
Return null;
}
B.
public |AsyncResult DownloadAsync[]
{
Return null;
}
C.
public |AsyncResult BeginDownload[]
{
Return null;
}
D.
public Void DownloadAsync[]
{
Return null;
}
Explanation:
If it is an event-base asynchronous pattern, a worker thread raises an event to signal completion of an asynchronous process. The event should have the same name of the synchronous method suffixed with "Completed".Incorrect Answers:
A, B, C: To adhere to the pattern, you should name the method DownloadAsync. You also should not return a value from the method.